==> Building on infernape ==> Checking for remote environment... ==> Syncing package to remote host... sending incremental file list created directory packages/gnutls ./ .SRCINFO 1,119 100% 0.00kB/s 0:00:00 1,119 100% 0.00kB/s 0:00:00 (xfr#1, to-chk=13/15) .nvchecker.toml 71 100% 69.34kB/s 0:00:00 71 100% 69.34kB/s 0:00:00 (xfr#2, to-chk=12/15) LICENSE 646 100% 630.86kB/s 0:00:00 646 100% 630.86kB/s 0:00:00 (xfr#3, to-chk=11/15) PKGBUILD 2,210 100% 2.11MB/s 0:00:00 2,210 100% 2.11MB/s 0:00:00 (xfr#4, to-chk=10/15) REUSE.toml 389 100% 379.88kB/s 0:00:00 389 100% 379.88kB/s 0:00:00 (xfr#5, to-chk=9/15) config 303 100% 295.90kB/s 0:00:00 303 100% 295.90kB/s 0:00:00 (xfr#6, to-chk=8/15) gnutls-3.8.13-2.log 738 100% 720.70kB/s 0:00:00 738 100% 720.70kB/s 0:00:00 (xfr#7, to-chk=7/15) LICENSES/ LICENSES/0BSD.txt -> ../LICENSE keys/ keys/pgp/ keys/pgp/462225C3B46F34879FC8496CD605848ED7E69871.asc 3,955 100% 3.77MB/s 0:00:00 3,955 100% 3.77MB/s 0:00:00 (xfr#8, to-chk=2/15) keys/pgp/5D46CB0F763405A7053556F47A75A648B3F9220C.asc 669 100% 653.32kB/s 0:00:00 669 100% 653.32kB/s 0:00:00 (xfr#9, to-chk=1/15) keys/pgp/E987AB7F7E89667776D05B3BB0E9DD20B29F1432.asc 6,754 100% 6.44MB/s 0:00:00 6,754 100% 6.44MB/s 0:00:00 (xfr#10, to-chk=0/15) sent 12,476 bytes received 270 bytes 8,497.33 bytes/sec total size is 16,322 speedup is 1.28 ==> Ensuring required PGP keys are present...  -> Checking for E987AB7F7E89667776D05B3BB0E9DD20B29F1432... ==> Patching arch to riscv64... ==> Running pkgctl build --arch riscv64 on remote host... ==> WARNING: invalid architecture: riscv64 ==> Updating pacman database cache [?25l:: Synchronizing package databases... core downloading... extra downloading... multilib downloading... [?25h==> Building gnutls  -> repo: core-testing  -> arch: riscv64  -> worker: felix-7 ==> Building gnutls for [core-testing] (riscv64) ]3008;start=bfb6fc892edf4fe48c8a8b0dda2bdb66;user=root;hostname=infernape.felixc.at;machineid=2e397cddc373469b84ba49094179ed95;bootid=c7b18150321b48f78049ddd8ba2aeb26;pid=2619750;pidfdid=22719909;comm=systemd-nspawn;container=arch-nspawn-2619750;type=container\]11;?\]2;🔵 Container arch-nspawn-2619750 on infernape.felixc.at\[?25l:: Synchronizing package databases... core downloading... extra downloading... :: Starting full system upgrade... resolving dependencies... looking for conflicting packages... Package (1) Old Version New Version Net Change Download Size core/nettle 3.10.2-1 4.0-1 -0.02 MiB 0.48 MiB Total Download Size: 0.48 MiB Total Installed Size: 0.99 MiB Net Upgrade Size: -0.02 MiB :: Proceed with installation? [Y/n] :: Retrieving packages... nettle-4.0-1-riscv64 downloading... checking keyring... checking package integrity... loading package files... checking for file conflicts... :: Processing package changes... upgrading nettle... ^C Interrupt signal received [?25herror: command terminated by signal 2: Interrupt [?25h[!p]104\[?7h]3008;end=bfb6fc892edf4fe48c8a8b0dda2bdb66\==> Building in chroot for [core-testing] (riscv64)... ==> Synchronizing chroot copy [/var/lib/archbuild/core-testing-riscv64/root] -> [felix-7]...done ==> Making package: gnutls 3.8.13-2 (Sun May 17 02:44:41 2026) ==> Retrieving sources...  -> Downloading gnutls-3.8.13.tar.xz... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 00:01 0 2 6.93M 2 192.0k 0 0 89265 0 01:21 00:02 01:19 162.2k 17 6.93M 17 1.24M 0 0 375.7k 0 00:18 00:03 00:15 537.6k 35 6.93M 35 2.46M 0 0 552.4k 0 00:12 00:04 00:08 710.7k 50 6.93M 50 3.47M 0 0 618.3k 0 00:11 00:05 00:06 751.5k 61 6.93M 61 4.25M 0 0 642.1k 0 00:11 00:06 00:05 755.7k 71 6.93M 71 4.94M 0 0 642.8k 0 00:11 00:07 00:04 858.4k 83 6.93M 83 5.81M 0 0 668.1k 0 00:10 00:08 00:02 847.3k 94 6.93M 94 6.52M 0 0 667.5k 0 00:10 00:10 764.5k 100 6.93M 100 6.93M 0 0 677.1k 0 00:10 00:10 764.5k 100 6.93M 100 6.93M 0 0 677.1k 0 00:10 00:10 764.5k 100 6.93M 100 6.93M 0 0 677.1k 0 00:10 00:10 764.5k  -> Downloading gnutls-3.8.13.tar.xz.sig... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 0 100 685 100 685 0 0 716 0 0 100 685 100 685 0 0 715 0 0 100 685 100 685 0 0 715 0 0  -> Found config ==> Validating source files with sha256sums... gnutls-3.8.13.tar.xz ... Passed gnutls-3.8.13.tar.xz.sig ... Skipped config ... Passed ==> Verifying source file signatures with gpg... gnutls-3.8.13.tar.xz ... Passed ]3008;start=b9187a57534541609cabdf372b39a785;user=root;hostname=infernape.felixc.at;machineid=2e397cddc373469b84ba49094179ed95;bootid=c7b18150321b48f78049ddd8ba2aeb26;pid=2627341;pidfdid=22101175;comm=systemd-nspawn;container=arch-nspawn-2627341;type=container\]11;?\]2;🔵 Container arch-nspawn-2627341 on infernape.felixc.at\==> Making package: gnutls 3.8.13-2 (Sat May 16 18:45:19 2026) ==> Checking runtime dependencies... ==> Checking buildtime dependencies... ==> Installing missing dependencies... [?25lresolving dependencies... looking for conflicting packages... Package (10) New Version Net Change Download Size extra/docbook-xml 4.5-11 1.96 MiB extra/docbook-xsl 1.79.2-9 26.32 MiB core/efivar 39-2 0.50 MiB 0.15 MiB core/glib2-docs 2.88.1-1 66.78 MiB 4.30 MiB extra/libxslt 1.1.45-2 0.76 MiB extra/python-lxml 6.1.0-1 5.40 MiB 1.61 MiB extra/python-pygments 2.20.0-1 15.36 MiB extra/gtk-doc 1.36.1-1 3.43 MiB 0.36 MiB core/net-tools 2.10-3 0.46 MiB 0.14 MiB extra/tpm2-tools 5.7-1 1.45 MiB 0.72 MiB Total Download Size: 7.28 MiB Total Installed Size: 122.44 MiB :: Proceed with installation? [Y/n] :: Retrieving packages... glib2-docs-2.88.1-1-riscv64 downloading... python-lxml-6.1.0-1-riscv64 downloading... tpm2-tools-5.7-1-riscv64 downloading... gtk-doc-1.36.1-1-any downloading... efivar-39-2-riscv64 downloading... net-tools-2.10-3-riscv64 downloading... checking keyring... checking package integrity... loading package files... checking for file conflicts... :: Processing package changes... installing docbook-xml... error: command terminated by signal 11: Segmentation fault installing libxslt... Optional dependencies for libxslt python: Python bindings [installed] installing docbook-xsl... error: command terminated by signal 11: Segmentation fault installing glib2-docs... installing python-lxml... Optional dependencies for python-lxml python-beautifulsoup4: support for beautifulsoup parser to parse not well formed HTML python-cssselect: support for cssselect python-html5lib: support for html5lib parser python-lxml-docs: offline docs python-lxml-html-clean: enable htmlclean feature installing python-pygments... installing gtk-doc... Optional dependencies for gtk-doc dblatex: PDF support installing net-tools... installing efivar... installing tpm2-tools... Optional dependencies for tpm2-tools tpm2-abrmd: user space resource manager error: command terminated by signal 11: Segmentation fault :: Running post-transaction hooks... (1/1) Arming ConditionNeedsUpdate... error: command terminated by signal 11: Segmentation fault [?25h==> Retrieving sources...  -> Found gnutls-3.8.13.tar.xz  -> Found gnutls-3.8.13.tar.xz.sig  -> Found config ==> WARNING: Skipping all source file integrity checks. ==> Extracting sources...  -> Extracting gnutls-3.8.13.tar.xz with bsdtar ==> Starting prepare()... autoreconf: export WARNINGS= autoreconf: Entering directory '.' autoreconf: running: autopoint --force autopoint: using AM_GNU_GETTEXT_REQUIRE_VERSION instead of AM_GNU_GETTEXT_VERSION Copying file m4/build-to-host.m4 Copying file m4/gettext.m4 Copying file m4/iconv.m4 Copying file m4/intlmacosx.m4 Copying file m4/nls.m4 Copying file m4/po.m4 Copying file m4/progtest.m4 Copying file po/Makefile.in.in Copying file po/Makevars.template Copying file po/Rules-quot Copying file po/boldquot.sed Copying file po/en@boldquot.header Copying file po/en@quot.header Copying file po/fetch-po Copying file po/insert-header.sed Copying file po/quot.sed autoreconf: running: aclocal --force -I m4 -I src/gl/m4 -I lib/unistring/m4 --install aclocal: overwriting 'm4/libtool.m4' with '/usr/share/aclocal/libtool.m4' aclocal: overwriting 'm4/ltoptions.m4' with '/usr/share/aclocal/ltoptions.m4' aclocal: overwriting 'm4/ltversion.m4' with '/usr/share/aclocal/ltversion.m4' aclocal: overwriting 'm4/pkg.m4' with '/usr/share/aclocal/pkg.m4' autoreconf: configure.ac: tracing autoreconf: running: libtoolize --copy --force libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'. libtoolize: copying file 'build-aux/ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. libtoolize: copying file 'm4/libtool.m4' libtoolize: copying file 'm4/ltoptions.m4' libtoolize: copying file 'm4/ltsugar.m4' libtoolize: copying file 'm4/ltversion.m4' libtoolize: copying file 'm4/lt~obsolete.m4' autoreconf: configure.ac: not using Intltool autoreconf: running: gtkdocize --copy autoreconf: configure.ac: not running autopoint a second time autoreconf: running: aclocal --force -I m4 -I src/gl/m4 -I lib/unistring/m4 --install autoreconf: running: /usr/bin/autoconf --force autoreconf: running: /usr/bin/autoheader --force autoreconf: running: automake --add-missing --copy --force-missing configure.ac:39: installing 'build-aux/compile' configure.ac:29: installing 'build-aux/missing' aminclude_static.am:52: warning: if $(CODE_COVERAGE_BRANCH_COVERAGE: non-POSIX variable name aminclude_static.am:52: (probably a GNU make extension) Makefile.am:170: 'aminclude_static.am' included from here aminclude_static.am:59: warning: if $(CODE_COVERAGE_BRANCH_COVERAGE: non-POSIX variable name aminclude_static.am:59: (probably a GNU make extension) Makefile.am:170: 'aminclude_static.am' included from here aminclude_static.am:63: warning: ':='-style assignments are not portable Makefile.am:170: 'aminclude_static.am' included from here aminclude_static.am:64: warning: code_coverage_v_lcov_cap_$(V: non-POSIX recursive variable expansion Makefile.am:170: 'aminclude_static.am' included from here aminclude_static.am:65: warning: code_coverage_v_lcov_cap_$(AM_DEFAULT_VERBOSITY: non-POSIX recursive variable expansion Makefile.am:170: 'aminclude_static.am' included from here aminclude_static.am:67: warning: code_coverage_v_lcov_ign_$(V: non-POSIX recursive variable expansion Makefile.am:170: 'aminclude_static.am' included from here aminclude_static.am:68: warning: code_coverage_v_lcov_ign_$(AM_DEFAULT_VERBOSITY: non-POSIX recursive variable expansion Makefile.am:170: 'aminclude_static.am' included from here aminclude_static.am:70: warning: code_coverage_v_genhtml_$(V: non-POSIX recursive variable expansion Makefile.am:170: 'aminclude_static.am' included from here aminclude_static.am:71: warning: code_coverage_v_genhtml_$(AM_DEFAULT_VERBOSITY: non-POSIX recursive variable expansion Makefile.am:170: 'aminclude_static.am' included from here aminclude_static.am:73: warning: code_coverage_quiet_$(V: non-POSIX recursive variable expansion Makefile.am:170: 'aminclude_static.am' included from here aminclude_static.am:74: warning: code_coverage_quiet_$(AM_DEFAULT_VERBOSITY: non-POSIX recursive variable expansion Makefile.am:170: 'aminclude_static.am' included from here aminclude_static.am:78: warning: subst -,_,$(subst .,_,$(1: non-POSIX variable name aminclude_static.am:78: (probably a GNU make extension) Makefile.am:170: 'aminclude_static.am' included from here aminclude_static.am:87: warning: addprefix --directory ,$(CODE_COVERAGE_DIRECTORY: non-POSIX variable name aminclude_static.am:87: (probably a GNU make extension) Makefile.am:170: 'aminclude_static.am' included from here aminclude_static.am:87: warning: call code_coverage_sanitize,$(PACKAGE_NAME: non-POSIX variable name aminclude_static.am:87: (probably a GNU make extension) Makefile.am:170: 'aminclude_static.am' included from here aminclude_static.am:88: warning: addprefix --directory ,$(CODE_COVERAGE_DIRECTORY: non-POSIX variable name aminclude_static.am:88: (probably a GNU make extension) Makefile.am:170: 'aminclude_static.am' included from here aminclude_static.am:90: warning: addprefix --prefix ,$(CODE_COVERAGE_DIRECTORY: non-POSIX variable name aminclude_static.am:90: (probably a GNU make extension) Makefile.am:170: 'aminclude_static.am' included from here aminclude_static.am:100: warning: ':='-style assignments are not portable Makefile.am:170: 'aminclude_static.am' included from here aminclude_static.am:100: warning: AM_DISTCHECK_CONFIGURE_FLAGS was already defined in condition TRUE, which includes condition CODE_COVERAGE_ENABLED ... Makefile.am:170: 'aminclude_static.am' included from here Makefile.am:23: ... 'AM_DISTCHECK_CONFIGURE_FLAGS' previously defined here doc/Makefile.am: installing 'build-aux/depcomp' tests/Makefile.am:544: warning: variable 'pkcs11_trust_fault_LDADD' is defined but no program or tests/Makefile.am:544: library has 'pkcs11_trust_fault' as canonical name (possible typo) tests/Makefile.am:543: warning: variable 'pkcs11_trust_fault_DEPENDENCIES' is defined but no program or tests/Makefile.am:543: library has 'pkcs11_trust_fault' as canonical name (possible typo) autoreconf: 'build-aux/config.sub' is updated autoreconf: 'build-aux/config.guess' is updated autoreconf: configure.ac: not running make: --make not given autoreconf: Leaving directory '.' ==> Starting build()... checking build system type... riscv64-unknown-linux-gnu checking host system type... riscv64-unknown-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking whether sleep supports fractional seconds... yes checking filesystem timestamp resolution... 0.01 checking whether build environment is sane... yes checking for a race-free mkdir -p... /usr/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking xargs -n works... yes checking whether UID '1000' is supported by ustar format... yes checking whether GID '1000' is supported by ustar format... yes checking how to create a ustar tar archive... gnutar *** *** Checking for compilation programs... checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether the compiler supports GNU C... yes checking whether gcc accepts -g... yes checking for gcc option to enable C23 features... none needed checking whether gcc understands -c and -o together... yes checking whether the compiler is clang... no checking for compiler option needed when checking for declarations... none checking whether make supports the include directive... yes (GNU style) checking dependency style of gcc... gcc3 checking for stdio.h... yes checking for stdlib.h... yes checking for string.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for strings.h... yes checking for sys/stat.h... yes checking for sys/types.h... yes checking for unistd.h... yes checking for wchar.h... yes checking for minix/config.h... no checking for sys/socket.h... yes checking for arpa/inet.h... yes checking for features.h... yes checking for stdbool.h... yes checking for byteswap.h... yes checking for uchar.h... yes checking for sys/param.h... yes checking for sys/time.h... yes checking for threads.h... yes checking for netdb.h... yes checking for netinet/in.h... yes checking for limits.h... yes checking for crtdefs.h... no checking for wctype.h... yes checking for xlocale.h... no checking for sys/mman.h... yes checking for pthread.h... yes checking for stdckdint.h... yes checking for sys/uio.h... yes checking for error.h... yes checking for stdio_ext.h... yes checking for termios.h... yes checking for sys/process.h... no checking for sys/select.h... yes checking for endian.h... yes checking for sys/endian.h... no checking for langinfo.h... yes checking for semaphore.h... yes checking for math.h... yes checking for sys/wait.h... yes checking for sys/ioctl.h... yes checking for sys/un.h... yes checking whether it is safe to define __EXTENSIONS__... yes checking whether _XOPEN_SOURCE should be defined... no checking how to run the C preprocessor... gcc -E checking for egrep -e... /usr/bin/grep -E checking for Minix Amsterdam compiler... no checking for ar... ar checking the archiver (ar) interface... ar checking for ar... (cached) ar checking for ranlib... ranlib checking for gcc option to support large files... none needed checking dependency style of gcc... gcc3 checking the archiver (ar) interface... (cached) ar checking for g++... g++ checking whether the compiler supports GNU C++... yes checking whether g++ accepts -g... yes checking dependency style of g++... gcc3 checking for bison... bison -y checking for a sed that does not truncate output... /usr/bin/sed checking whether to build with code coverage support... no checking whether to enable maintainer-specific portions of Makefiles... yes checking for faketime... no checking for datefudge... no checking whether faketime program works... no checking for inline... inline checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for __get_cpuid_count... no checking for struct iovec.iov_base... yes checking for netinet/tcp.h... yes checking for stdatomic.h... yes checking for library containing __atomic_load_4... none required checking for threads.h... (cached) yes checking for sanitizer/asan_interface.h... yes checking for valgrind/memcheck.h... no checking for getrandom... yes checking for KERN_ARND... no checking for getentropy... no checking for nettle >= 3.10... yes checking for hogweed >= 3.10 ... yes checking for __gmpz_cmp in -lgmp... yes checking for libtasn1 >= 4.9... yes checking whether to use the included minitasn1... no checking whether to disable strict DER time encodings for backwards compatibility... no checking whether to allow SHA1 as an acceptable hash for cert digital signatures... yes checking whether to disable the SSL 3.0 protocol... yes checking whether to disable the SSL 2.0 client hello... no checking whether to disable DTLS-SRTP extension... no checking whether to disable ALPN extension... no checking whether to enable TLS heartbeat support... no checking whether to enable SRP authentication support... no checking whether to disable PSK authentication support... no checking whether to disable anonymous authentication support... no checking whether to disable DHE support... no checking whether to disable ECDHE support... no checking whether to disable GOST support... no checking whether to add cryptodev support... no checking whether to add AF_ALG support... no checking whether to add KTLS support... yes checking whether KTLS is supported by the OS... checking for linux/tls.h... yes checking whether to disable OCSP support... no checking whether to enable crypto-auditing trace support... no checking for sys/sdt.h... yes checking whether defines DTRACE_PROBE... yes checking whether to enable HPKE support... no checking size of void *... 8 checking size of long long... 8 checking size of long... 8 checking size of int... 4 checking for library containing setsockopt... none needed checking whether to build OpenSSL compatibility layer... yes checking for gtk-doc... yes checking for gtkdoc-check... gtkdoc-check.test checking for gtkdoc-check... /usr/bin/gtkdoc-check checking for gtkdoc-rebase... /usr/bin/gtkdoc-rebase checking for gtkdoc-mkpdf... /usr/bin/gtkdoc-mkpdf checking whether to build gtk-doc documentation... no checking for glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0... yes checking whether NLS is requested... yes checking for msgfmt... /usr/bin/msgfmt checking for gmsgfmt... /usr/bin/msgfmt checking for xgettext... /usr/bin/xgettext checking for msgmerge... /usr/bin/msgmerge checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for shared library run path origin... done checking 32-bit host C ABI... no checking for ELF binary format... yes checking for the common suffixes of directories in the library search path... lib,lib,lib checking for CFPreferencesCopyAppValue... no checking for CFLocaleCopyPreferredLanguages... no checking for GNU gettext in libc... yes checking whether to use NLS... yes checking where the gettext function comes from... libc checking whether byte ordering is bigendian... no checking for fork... yes checking for setitimer... yes checking for getrusage... yes checking for getpwuid_r... yes checking for nanosleep... yes checking for daemon... yes checking for getpid... yes checking for localtime... yes checking for mmap... yes checking for clock_gettime... yes checking for fmemopen... yes checking for __register_atfork... yes checking for secure_getenv... yes checking for getauxval... yes checking for elf_aux_info... no checking for libseccomp... yes checking how to link with libseccomp... /usr/lib/libseccomp.so checking for libcrypto... yes checking how to link with libcrypto... /usr/lib/libcrypto.so od: cannot skip past end of combined input checking for librt... yes checking how to link with librt... -lrt checking for pthread_mutex_lock... yes checking for library containing u8_normalize... -lunistring checking for size_t... yes checking for working alloca.h... yes checking for alloca... yes checking whether the preprocessor supports include_next... yes checking whether source code line length is unlimited... yes checking whether char8_t is correctly defined... yes checking whether char16_t is correctly defined... yes checking whether char32_t is correctly defined... yes checking whether the C++ compiler has ... yes checking for bit size of wchar_t... 32 checking for mbstate_t... yes checking for mbsinit... yes checking for mbrtowc... yes checking for canonicalize_file_name... yes checking for realpath... yes checking for lstat... yes checking for _set_invalid_parameter_handler... no checking for explicit_bzero... yes checking for fcntl... yes checking for symlink... yes checking for getdtablesize... yes checking for gettimeofday... yes checking for iswcntrl... yes checking for mprotect... yes checking for memset_s... no checking for readlink... yes checking for secure_getenv... (cached) yes checking for getuid... yes checking for geteuid... yes checking for getgid... yes checking for getegid... yes checking for snprintf... yes checking for strndup... yes checking for localtime_r... yes checking for vasnprintf... no checking for wcwidth... yes checking for getpass... yes checking for getexecname... no checking for setenv... yes checking for __xpg_strerror_r... yes checking for btowc... yes checking for getlocalename_l... no checking for isblank... yes checking for pipe... yes checking for pselect... yes checking for pthread_sigmask... yes checking for sleep... yes checking for shutdown... yes checking for usleep... yes checking for mquery... no checking for pstat_getprocvm... no checking for wcrtomb... yes checking for wctob... yes checking for nl_langinfo and CODESET... yes checking for a traditional japanese locale... none checking for an english Unicode locale... en_US.UTF-8 checking for a transitional chinese locale... none checking whether mbrtowc handles incomplete characters... yes checking whether mbrtowc works as well as mbtowc... guessing yes checking for gcc options to detect undeclared functions... none needed checking for gcc options to ignore future-version functions... none needed checking whether mbrtoc32 is declared... yes checking for mbrtoc32... yes checking for a traditional french locale... none checking whether mbrtoc32 works as well as mbrtowc... guessing yes checking whether c32rtomb is declared... yes checking for c32rtomb... yes checking whether c32rtomb works as well as wcrtomb... guessing yes checking whether lstat correctly handles trailing slash... yes checking whether // is distinct from /... no checking whether realpath works... yes checking for faccessat... yes checking for getcwd... yes checking for complete errno.h... yes checking whether ctype.h defines __header_inline... no checking for working fcntl.h... yes checking for pid_t... yes checking for mode_t... yes checking whether byte ordering is bigendian... (cached) no checking whether fopen recognizes a trailing slash... yes checking whether fflush works on input streams... yes checking whether fclose works on input streams... yes checking whether stat file-mode macros are broken... no checking for C/C++ restrict keyword... __restrict__ checking for nlink_t... yes checking whether stdin defaults to large file offsets... yes checking for off64_t... yes checking for blksize_t... yes checking for blkcnt_t... yes checking whether ftello is declared... yes checking whether ungetc works on arbitrary bytes... yes checking for ftello... yes checking whether ftello works... yes checking whether getdelim is declared... yes checking whether getdtablesize is declared... yes checking whether getline is declared... yes checking for struct timeval... yes checking for wide-enough struct timeval.tv_sec member... yes checking for pthread.h... (cached) yes checking for pthread_kill in -lpthread... yes checking whether POSIX threads API is available... yes checking whether setlocale (LC_ALL, NULL) is multithread-safe... yes checking whether setlocale (category, NULL) is multithread-safe... yes checking whether is self-contained... yes checking for shutdown... (cached) yes checking whether defines the SHUT_* macros... yes checking for struct sockaddr_storage... yes checking for sa_family_t... yes checking for struct sockaddr_storage.ss_family... yes checking for IPv4 sockets... yes checking for IPv6 sockets... yes checking whether limits.h has WORD_BIT, BOOL_WIDTH etc.... yes checking whether limits.h has SSIZE_MAX... yes checking for wint_t... yes checking whether wint_t is large enough... yes checking whether the compiler produces multi-arch binaries... no checking whether stdint.h conforms to C99... yes checking whether stdint.h works without ISO C predefines... yes checking whether stdint.h has UINTMAX_WIDTH etc.... yes checking whether iswcntrl works... yes checking for towlower... yes checking for wctype_t... yes checking for wctrans_t... yes checking for good max_align_t... yes checking whether NULL can be used in arbitrary expressions... yes checking for unreachable in C... yes checking whether nullptr_t needs ... yes checking whether is idempotent... guessing yes checking whether locale.h defines locale_t... yes checking whether locale.h defines _locale_t... no checking whether locale.h conforms to POSIX:2001... yes checking whether struct lconv is properly defined... yes checking whether imported symbols can be declared weak... yes checking for multithread API to use... posix checking whether malloc is ptrdiff_t safe... yes checking whether malloc, calloc set errno on failure... yes checking whether malloc (0) returns nonnull... yes checking for MAP_ANONYMOUS... yes checking whether memchr works... yes checking whether memeq is declared... no checking whether memmem is declared... yes checking whether defines MIN and MAX... no checking whether defines MIN and MAX... yes checking for O_CLOEXEC... yes checking for promoted mode_t type... mode_t checking for pthread_t... yes checking for pthread_spinlock_t... yes checking for pthread_spin_init... yes checking whether realloc should abort upon undefined behaviour... no checking for glibc-compatible sys/cdefs.h... yes checking for sched.h... yes checking for struct sched_param... yes checking whether snprintf returns a byte count as in C99... yes checking whether printf supports POSIX/XSI format strings with positions... yes checking whether snprintf is declared... yes checking whether stdckdint.h can be included in C... yes checking checking for an ISO C23 compliant stdckdint.h in C... yes checking whether stdckdint.h can be included in C++... yes checking checking for an ISO C++26 compliant stdckdint.h in C++... no checking whether fcloseall is declared... yes checking whether getw is declared... yes checking whether putw is declared... yes checking which flavor of printf attribute matches inttypes macros... system checking whether ecvt is declared... yes checking whether fcvt is declared... yes checking whether gcvt is declared... yes checking whether MB_CUR_MAX is correct... yes checking whether strdup is declared... yes checking whether streq is declared... no checking whether strndup is declared... yes checking whether strnlen is declared... yes checking whether strtok_r is declared... yes checking for struct timespec in ... yes checking for TIME_UTC in ... yes checking whether execvpe is declared... yes checking for inttypes.h... yes checking for stdint.h... yes checking for intmax_t... yes checking whether snprintf truncates the result as in C99... yes checking where to find the exponent in a 'double'... word 1 bit 20 checking for wcslen... yes checking for snprintf... (cached) yes checking for strnlen... yes checking for wcrtomb... (cached) yes checking whether _snprintf is declared... no checking whether vsnprintf is declared... yes checking whether uses 'inline' correctly... yes checking whether wcsdup is declared... yes checking for C compiler option to allow warnings... -Wno-error checking for alignas and alignof... yes, keywords checking for alloca as a compiler built-in... yes checking for static_assert... yes, a keyword checking for bool, true, false... yes checking for __builtin_expect... yes checking for working bswap_16, bswap_32, bswap_64... yes checking whether // is distinct from /... (cached) no checking whether dup2 works... yes checking whether fcntl handles F_DUPFD correctly... yes checking whether fcntl understands F_DUPFD_CLOEXEC... needs runtime check checking whether float.h conforms to ISO C23... yes checking whether conversion from 'int' to 'long double' works... yes checking whether fopen supports the mode character 'x'... yes checking whether fopen supports the mode character 'e'... yes checking whether free is known to preserve errno... yes checking for __fseterr... no checking for ftello... (cached) yes checking whether ftello works... (cached) yes checking whether __func__ is available... yes checking for getdelim... yes checking for working getdelim function... yes checking whether getdtablesize works... yes checking for getline... yes checking for working getline function... yes checking for gettimeofday with POSIX signature... yes checking for library containing inet_ntop... none required checking whether inet_ntop is declared... yes checking for library containing inet_pton... none required checking whether inet_pton is declared... yes checking for iswblank... yes checking whether iswblank is declared... yes checking whether iswdigit is ISO C compliant... yes checking whether iswpunct is consistent with ispunct... yes checking whether iswxdigit is ISO C compliant... yes checking for objdump... objdump checking if gcc/ld supports -Wl,--output-def... no checking if LD -Wl,--version-script works... yes checking whether the compiler supports the __inline keyword... yes checking whether localeconv works... yes checking for pthread_rwlock_t... yes checking whether pthread_rwlock_rdlock prefers a writer to a reader... no checking whether lseek detects pipes... yes checking whether SEEK_DATA works but is incompatible with GNU... no checking whether mbrtoc32 works on empty input... yes checking whether the C locale is free of encoding errors... no checking whether mbrtoc32 works in an UTF-8 locale... yes checking whether mbrtowc handles a NULL pwc argument... yes checking whether mbrtowc has a correct return value... yes checking whether mbrtowc returns 0 when parsing a NUL character... guessing yes checking whether mbrtowc stores incomplete characters... no checking whether mbrtowc works on empty input... yes checking whether the C locale is free of encoding errors... no checking for memmem... yes checking whether memmem works... yes checking for mempcpy... yes checking for memset_explicit... yes checking whether is self-contained... yes checking whether open recognizes a trailing slash... yes checking for pmccabe... false checking for PTHREAD_CREATE_DETACHED... yes checking for PTHREAD_MUTEX_RECURSIVE... yes checking for PTHREAD_MUTEX_ROBUST... yes checking for PTHREAD_PROCESS_SHARED... yes checking whether pthread_once works... yes checking for rawmemchr... yes checking whether readlink signature is correct... yes checking whether readlink handles trailing slash correctly... yes checking whether readlink truncates results correctly... yes checking whether realloc sets errno on failure... yes checking whether realloc (..., 0) returns nonnull... no checking for stdint.h... (cached) yes checking for SIZE_MAX... yes checking for snprintf... (cached) yes checking whether snprintf respects a size of 1... yes checking for socklen_t... yes checking for ssize_t... yes checking whether stat handles trailing slashes on files... yes checking for struct stat.st_atim.tv_nsec... yes checking whether struct stat.st_atim is of type struct timespec... yes checking for struct stat.st_birthtimespec.tv_nsec... no checking for struct stat.st_birthtimensec... no checking for struct stat.st_birthtim.tv_nsec... no checking for vasprintf... yes checking for stpcpy... yes checking for strcasecmp... yes checking whether strcasecmp works... guessing yes checking for strncasecmp... yes checking whether strcasecmp works... (cached) guessing yes checking whether strncasecmp is declared... yes checking for working strndup... yes checking for working strnlen... yes checking for strtok_r... yes checking whether strtok_r works... yes checking for strverscmp... yes checking whether strverscmp works... yes checking whether localtime_r is declared... yes checking whether localtime_r is compatible with its POSIX signature... yes checking for variable-length arrays... yes checking for ptrdiff_t... yes checking for vasprintf... (cached) yes checking for vsnprintf... yes checking whether snprintf respects a size of 1... (cached) yes checking whether wcwidth is declared... yes checking whether wcwidth works reasonably in UTF-8 locales... yes checking for stdint.h... (cached) yes checking if environ is properly declared... yes checking for error... yes checking whether error_at_line is declared... yes checking for error_at_line... yes checking for working error function... yes checking whether strerror_r is declared... yes checking whether strerror_r returns char *... yes checking whether fseeko is declared... yes checking for fseeko... yes checking whether fflush works on input streams... (cached) yes checking for library containing gethostbyname... none required checking for gethostbyname... yes checking for library containing getservbyname... none required checking for getservbyname... yes checking whether fflush_unlocked is declared... yes checking whether flockfile is declared... yes checking whether fputs_unlocked is declared... yes checking whether funlockfile is declared... yes checking whether putc_unlocked is declared... yes checking whether timespec_get is declared... yes checking for timespec_get... yes checking whether INT32_MAX < INTMAX_MAX... yes checking whether INT64_MAX == LONG_MAX... yes checking whether UINT32_MAX < UINTMAX_MAX... yes checking whether UINT64_MAX == ULONG_MAX... yes checking whether time_t is signed... yes checking whether alarm is declared... yes checking for working mktime... yes checking for compound literals... yes checking for struct tm.tm_gmtoff... yes checking for struct tm.tm_zone... yes checking whether is self-contained... yes checking whether setenv is declared... yes checking whether _putenv is declared... no checking for search.h... yes checking for tsearch... yes checking for sigset_t... yes checking for uid_t... yes checking for gid_t... yes checking for volatile sig_atomic_t... yes checking for sighandler_t... yes checking whether strerror(0) succeeds... yes checking for strerror_r... yes checking for strerror_r with POSIX signature... no checking whether __xpg_strerror_r works... yes checking whether unsetenv is declared... yes checking for C++ compiler option to allow warnings... -Wno-error checking for a french Unicode locale... none checking for a turkish Unicode locale... none checking if endian.h defines stdint types... no checking if endian.h defines functions and macros... yes checking whether frexp() can be used without linking with libm... yes checking whether frexp works... yes checking whether long double and double are the same... no checking whether frexpl is declared... yes checking whether frexpl() can be used without linking with libm... yes checking whether frexpl works... yes checking whether getcwd (NULL, 0) allocates memory for result... yes checking for getcwd with POSIX signature... yes checking for uselocale... yes checking whether uselocale works... yes checking for fake locale system (OpenBSD, Android)... no checking for Solaris 11.4 locale system... no checking where to find the exponent in a 'float'... word 0 bit 23 checking where to find the exponent in a 'long double'... word 3 bit 16 checking for LC_MESSAGES... yes checking for library needed for semaphore functions... none checking whether NAN macro works... yes checking whether HUGE_VAL works... yes checking whether initstate is declared... yes checking whether setstate is declared... yes checking whether strncpy works... yes checking whether declares ioctl... yes checking for alignas and alignof... (cached) yes, keywords checking for alloca as a compiler built-in... (cached) yes checking for static_assert... (cached) yes, a keyword checking for bool, true, false... (cached) yes checking for __builtin_expect... (cached) yes checking for working bswap_16, bswap_32, bswap_64... (cached) yes checking whether calloc (0, n) and calloc (n, 0) return nonnull... yes checking for library containing clock_gettime... none required checking for clock_getres... yes checking for clock_gettime... yes checking for clock_settime... yes checking whether // is distinct from /... (cached) no checking whether dup2 works... (cached) yes checking whether fcntl handles F_DUPFD correctly... (cached) yes checking whether fcntl understands F_DUPFD_CLOEXEC... (cached) needs runtime check checking for flexible array member... yes checking whether float.h conforms to ISO C23... (cached) yes checking whether conversion from 'int' to 'long double' works... (cached) yes checking whether fopen supports the mode character 'x'... (cached) yes checking whether fopen supports the mode character 'e'... (cached) yes checking for __fpending... yes checking whether __fpending is declared... yes checking whether free is known to preserve errno... (cached) yes checking for fseeko... (cached) yes checking whether fflush works on input streams... (cached) yes checking for __fseterr... (cached) no checking for ftello... (cached) yes checking whether ftello works... (cached) yes checking whether __func__ is available... (cached) yes checking for library containing getaddrinfo... none required checking for getaddrinfo... yes checking whether getaddrinfo supports AI_NUMERICHOST and AI_NUMERICSERV... yes checking whether gai_strerror is declared... yes checking whether gai_strerrorA is declared... no checking for gai_strerror with POSIX signature... yes checking for struct sockaddr.sa_len... no checking whether getaddrinfo is declared... yes checking whether freeaddrinfo is declared... yes checking whether getnameinfo is declared... yes checking for struct addrinfo... yes checking for getdelim... (cached) yes checking for working getdelim function... (cached) yes checking whether getdtablesize works... (cached) yes checking for getline... (cached) yes checking for working getline function... (cached) yes checking for getprogname... no checking whether program_invocation_name is declared... yes checking whether program_invocation_name is declared... (cached) yes checking whether program_invocation_short_name is declared... yes checking whether __argv is declared... no checking for gettimeofday with POSIX signature... (cached) yes checking for library containing gethostbyname... (cached) none required checking for gethostbyname... (cached) yes checking for library containing inet_ntop... (cached) none required checking whether inet_ntop is declared... (cached) yes checking for library containing inet_pton... (cached) none required checking whether inet_pton is declared... (cached) yes checking for iswblank... (cached) yes checking whether iswblank is declared... (cached) yes checking whether iswdigit is ISO C compliant... (cached) yes checking whether iswpunct is consistent with ispunct... (cached) yes checking whether iswxdigit is ISO C compliant... (cached) yes checking whether the compiler supports the __inline keyword... (cached) yes checking whether localeconv works... (cached) yes checking for pthread_rwlock_t... (cached) yes checking whether pthread_rwlock_rdlock prefers a writer to a reader... (cached) no checking whether lseek detects pipes... (cached) yes checking whether SEEK_DATA works but is incompatible with GNU... (cached) no checking whether mbrtoc32 works on empty input... (cached) yes checking whether the C locale is free of encoding errors... (cached) no checking whether mbrtoc32 works in an UTF-8 locale... (cached) yes checking whether mbrtowc handles a NULL pwc argument... (cached) yes checking whether mbrtowc has a correct return value... (cached) yes checking whether mbrtowc returns 0 when parsing a NUL character... (cached) guessing yes checking whether mbrtowc stores incomplete characters... (cached) no checking whether mbrtowc works on empty input... (cached) yes checking whether the C locale is free of encoding errors... (cached) no checking for memmem... (cached) yes checking whether memmem works... (cached) yes checking for mempcpy... (cached) yes checking for memset_explicit... (cached) yes checking for __mktime_internal... no checking whether is self-contained... (cached) yes checking whether open recognizes a trailing slash... (cached) yes checking for bison... bison checking for bison 2.4 or newer... 3.8.2, ok checking whether program_invocation_name is declared... (cached) yes checking whether program_invocation_short_name is declared... (cached) yes checking for PTHREAD_CREATE_DETACHED... (cached) yes checking for PTHREAD_MUTEX_RECURSIVE... (cached) yes checking for PTHREAD_MUTEX_ROBUST... (cached) yes checking for PTHREAD_PROCESS_SHARED... (cached) yes checking whether pthread_once works... (cached) yes checking for rawmemchr... (cached) yes checking whether readlink signature is correct... (cached) yes checking whether readlink handles trailing slash correctly... (cached) yes checking whether readlink truncates results correctly... (cached) yes checking whether realloc sets errno on failure... (cached) yes checking whether realloc (..., 0) returns nonnull... (cached) no checking for reallocarray... yes checking whether select supports a 0 argument... yes checking whether select detects invalid fds... yes checking for library containing getservbyname... (cached) none required checking for getservbyname... (cached) yes checking whether setenv validates arguments... yes checking for stdint.h... (cached) yes checking for SIZE_MAX... (cached) yes checking for snprintf... (cached) yes checking whether snprintf respects a size of 1... (cached) yes checking for socklen_t... (cached) yes checking for ssize_t... (cached) yes checking whether stat handles trailing slashes on files... (cached) yes checking for struct stat.st_atim.tv_nsec... (cached) yes checking whether struct stat.st_atim is of type struct timespec... (cached) yes checking for struct stat.st_birthtimespec.tv_nsec... (cached) no checking for struct stat.st_birthtimensec... (cached) no checking for struct stat.st_birthtim.tv_nsec... (cached) no checking for vasprintf... (cached) yes checking for stpcpy... (cached) yes checking for strcasecmp... (cached) yes checking whether strcasecmp works... (cached) guessing yes checking for working strerror function... yes checking for strncasecmp... (cached) yes checking whether strcasecmp works... (cached) guessing yes checking whether strncasecmp is declared... (cached) yes checking for working strndup... (cached) yes checking for working strnlen... (cached) yes checking for strtok_r... (cached) yes checking whether strtok_r works... (cached) yes checking for strverscmp... (cached) yes checking whether strverscmp works... (cached) yes checking whether localtime_r is declared... (cached) yes checking whether localtime_r is compatible with its POSIX signature... (cached) yes checking whether localtime works even near extrema... yes checking for timezone_t... no checking for tzalloc... no checking for timegm... yes checking for unsetenv... yes checking for unsetenv() return type... int checking whether unsetenv obeys POSIX... yes checking for variable-length arrays... (cached) yes checking for ptrdiff_t... (cached) yes checking for vasprintf... (cached) yes checking for vsnprintf... (cached) yes checking whether snprintf respects a size of 1... (cached) yes checking whether wcwidth is declared... (cached) yes checking whether wcwidth works reasonably in UTF-8 locales... (cached) yes checking for stdint.h... (cached) yes checking whether btowc(0) is correct... yes checking whether btowc is consistent with mbrtowc in the C locale... no checking whether c32rtomb return value is correct... yes checking whether fdopen sets errno... yes checking for ftruncate... yes checking for newlocale... yes checking for duplocale... yes checking for freelocale... yes checking for newlocale... (cached) yes checking for duplocale... (cached) yes checking for freelocale... (cached) yes checking for getpagesize... yes checking whether getpagesize is declared... yes checking for duplocale... (cached) yes checking whether htons is declared... yes checking whether htonl is declared... yes checking whether ntohs is declared... yes checking whether ntohl is declared... yes checking whether byte ordering is bigendian... (cached) no checking whether byte ordering is bigendian... (cached) no checking for ioctl... yes checking for ioctl with POSIX signature... no checking whether isnan(double) can be used without linking with libm... yes checking whether isnan(float) can be used without linking with libm... yes checking whether isnan(float) works... yes checking whether isnan(long double) can be used without linking with libm... yes checking whether isnanl works... yes checking for newlocale... (cached) yes checking for newlocale... (cached) yes checking for mbtowc... yes checking for mkfifo... yes checking whether mkfifo rejects trailing slashes... yes checking for library containing nanosleep... none required checking for working nanosleep... no (mishandles large arguments) checking whether perror matches strerror... yes checking whether signature of pselect conforms to POSIX... yes checking whether pselect detects invalid fds... yes checking for pthread_mutexattr_getrobust... yes checking for pthread_rwlock_init... yes checking whether pthread_rwlock_timedrdlock is declared... yes checking for reasonable pthread_rwlock wait queue handling... no checking whether pthread_create exists as a global function... yes checking whether pthread_mutex_timedlock is declared... yes checking for pthread_mutex_timedlock... yes checking whether pthread_sigmask is a macro... no checking whether pthread_sigmask works without -lpthread... yes checking whether pthread_sigmask returns error numbers... yes checking for putenv compatible with GNU and SVID... yes checking for raise... yes checking for sigprocmask... yes checking for random... yes checking for initstate... yes checking for setstate... yes checking for random.h... no checking for struct random_data... yes checking for random_r... yes checking whether sched_yield is declared... yes checking for signbit macro... yes checking for signbit compiler built-ins... yes checking for sigprocmask... (cached) yes checking whether sleep is declared... yes checking for working sleep... yes checking for catgets... yes checking whether symlink handles trailing slash correctly... yes checking for IPv4 sockets... (cached) yes checking for IPv6 sockets... (cached) yes checking for UNIX domain sockets... yes checking for pthread_atfork... yes checking for sys/single_threaded.h... yes checking whether time() works... guessing no checking for struct tm.tm_gmtoff... (cached) yes checking for struct tm.tm_zone... (cached) yes checking whether trunc is declared... yes checking whether truncl is declared... yes checking for useconds_t... yes checking whether usleep allows large arguments... yes checking whether wcrtomb works in the C locale... yes checking whether wcrtomb return value is correct... yes checking whether wctob works... guessing yes checking for bool, true, false... (cached) yes checking whether the compiler generally respects inline... yes checking for ssize_t... (cached) yes checking for libev... no checking whether C compiler handles -Werror -Wunknown-warning-option... no checking whether C compiler handles -Wtype-limits... yes checking whether -Wno-missing-field-initializers is needed... no checking whether -Wuninitialized is supported... yes checking whether C compiler handles -fanalyzer... yes checking whether C compiler handles -fstrict-flex-arrays... yes checking whether C compiler handles -Wall... yes checking whether C compiler handles -Wbad-function-cast... yes checking whether C compiler handles -Wcast-align=strict... yes checking whether C compiler handles -Wdate-time... yes checking whether C compiler handles -Wdouble-promotion... yes checking whether C compiler handles -Wduplicated-branches... yes checking whether C compiler handles -Wduplicated-cond... yes checking whether C compiler handles -Wextra... yes checking whether C compiler handles -Wflex-array-member-not-at-end... yes checking whether C compiler handles -Winit-self... yes checking whether C compiler handles -Winvalid-pch... yes checking whether C compiler handles -Wlogical-op... yes checking whether C compiler handles -Wmissing-declarations... yes checking whether C compiler handles -Wmissing-include-dirs... yes checking whether C compiler handles -Wmissing-prototypes... yes checking whether C compiler handles -Wnested-externs... yes checking whether C compiler handles -Wnull-dereference... yes checking whether C compiler handles -Wold-style-definition... yes checking whether C compiler handles -Wopenmp-simd... yes checking whether C compiler handles -Wpacked... yes checking whether C compiler handles -Wpointer-arith... yes checking whether C compiler handles -Wshadow... yes checking whether C compiler handles -Wstrict-flex-arrays... yes checking whether C compiler handles -Wstrict-prototypes... yes checking whether C compiler handles -Wsuggest-attribute=cold... yes checking whether C compiler handles -Wsuggest-attribute=format... yes checking whether C compiler handles -Wsuggest-attribute=malloc... yes checking whether C compiler handles -Wsync-nand... yes checking whether C compiler handles -Wtrampolines... yes checking whether C compiler handles -Wuninitialized... yes checking whether C compiler handles -Wunknown-pragmas... yes checking whether C compiler handles -Wunused-macros... yes checking whether C compiler handles -Wvariadic-macros... yes checking whether C compiler handles -Wvector-operation-performance... yes checking whether C compiler handles -Wwrite-strings... yes checking whether C compiler handles -Warray-bounds=2... yes checking whether C compiler handles -Wattribute-alias=2... yes checking whether C compiler handles -Wbidi-chars=any,ucn... yes checking whether C compiler handles -Wformat-overflow=2... yes checking whether C compiler handles -Wformat=2... yes checking whether C compiler handles -Wformat-truncation=2... yes checking whether C compiler handles -Wimplicit-fallthrough=5... yes checking whether C compiler handles -Wshift-overflow=2... yes checking whether C compiler handles -Wuse-after-free=3... yes checking whether C compiler handles -Wunused-const-variable=2... yes checking whether C compiler handles -Wvla-larger-than=4031... yes checking whether C compiler handles -Wzero-as-null-pointer-constant... yes checking whether C compiler handles -Wthread-safety... no checking whether C compiler handles -Wno-analyzer-malloc-leak... yes checking whether C compiler handles -Wno-missing-field-initializers... yes checking whether C compiler handles -Wno-unused-parameter... yes checking whether C compiler handles -Wno-format-truncation... yes checking whether C compiler handles -Wimplicit-fallthrough=2... yes checking whether C compiler handles -Wabi=11... yes checking whether C compiler handles -fdiagnostics-show-option... yes checking whether C compiler handles -fno-builtin-strcmp... yes checking whether ln -s works... yes checking how to print strings... printf checking for a sed that does not truncate output... (cached) /usr/bin/sed checking for fgrep... /usr/bin/grep -F checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking the maximum length of command line arguments... 1572864 checking how to convert riscv64-unknown-linux-gnu file names to riscv64-unknown-linux-gnu format... func_convert_file_noop checking how to convert riscv64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop checking for /usr/bin/ld option to reload object files... -r checking for file... file checking for objdump... (cached) objdump checking how to recognize dependent libraries... pass_all checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for archiver @FILE support... @ checking for strip... strip checking command to parse /usr/bin/nm -B output from gcc object... ok checking for sysroot... no checking for a working dd... /usr/bin/dd checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1 checking for mt... no checking if : is a manifest tool... no checking for dlfcn.h... yes checking which variant of shared library versioning to provide... (default) aix checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking how to run the C++ preprocessor... g++ -E checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC -DPIC checking if g++ PIC flag -fPIC -DPIC works... yes checking if g++ static flag -static works... yes checking if g++ supports -c -o file.o... yes checking if g++ supports -c -o file.o... (cached) yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking dynamic linker characteristics... (cached) GNU/Linux ld.so checking how to hardcode library paths into programs... immediate od: cannot skip past end of combined input checking for libdl... yes checking how to link with libdl... -ldl checking for cmocka >= 1.0.1... no checking for libidn2 >= 2.0.0... yes checking for nettle_get_secp_192r1 in -lhogweed... yes checking for nettle_gost28147_set_key... no checking for nettle_magma_set_key... no checking for nettle_kuznyechik_set_key... no checking for nettle_cmac_magma_update... no checking for nettle_cmac_kuznyechik_update... no checking gmp soname... libgmp.so.10 checking nettle soname... libnettle.so.9 checking hogweed soname... libhogweed.so.7 checking whether to build libdane... yes checking for unbound library... no configure: WARNING: *** *** libunbound was not found. Libdane will not be built. *** checking for p11-kit-1 >= 0.23.1... yes checking m soname... checking whether dlopen works with SONAME... yes checking for tss2-esys... yes checking for tss2-mu... yes checking for tss2-tctildr... yes checking tss2-esys soname... libtss2-esys.so.0 checking tss2-mu soname... libtss2-mu.so.0 checking tss2-tctildr soname... libtss2-tctildr.so.0 checking for Esys_SetCryptoCallbacks... yes checking for tss library... no configure: WARNING: *** *** trousers was not found. TPM support will be disabled. *** checking size of unsigned long int... 8 checking size of unsigned int... 4 checking size of time_t... 8 checking for zlib... yes checking z soname... libz.so.1 checking for libbrotlienc >= 1.0.0... yes checking for libbrotlidec >= 1.0.0... yes checking brotlienc soname... libbrotlienc.so.1 checking brotlidec soname... libbrotlidec.so.1 checking for libzstd... yes checking zstd soname... libzstd.so.1 checking for leancrypto >= 1.2.0... yes checking for lc_dilithium_pk_from_sk... yes checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating ldd.sh config.status: creating Makefile config.status: creating doc/Makefile config.status: creating doc/credentials/Makefile config.status: creating doc/credentials/srp/Makefile config.status: creating doc/credentials/x509/Makefile config.status: creating doc/doxygen/Doxyfile config.status: creating doc/examples/Makefile config.status: creating doc/latex/Makefile config.status: creating doc/manpages/Makefile config.status: creating doc/reference/Makefile config.status: creating doc/reference/version.xml config.status: creating doc/scripts/Makefile config.status: creating extra/Makefile config.status: creating extra/includes/Makefile config.status: creating libdane/Makefile config.status: creating libdane/includes/Makefile config.status: creating libdane/gnutls-dane.pc config.status: creating gl/Makefile config.status: creating lib/Makefile config.status: creating lib/accelerated/Makefile config.status: creating lib/accelerated/x86/Makefile config.status: creating lib/accelerated/aarch64/Makefile config.status: creating lib/algorithms/Makefile config.status: creating lib/auth/Makefile config.status: creating lib/ext/Makefile config.status: creating lib/extras/Makefile config.status: creating lib/gnutls.pc config.status: creating lib/includes/Makefile config.status: creating lib/includes/gnutls/gnutls.h config.status: creating lib/minitasn1/Makefile config.status: creating lib/nettle/Makefile config.status: creating lib/pkcs11/Makefile config.status: creating lib/x509/Makefile config.status: creating lib/unistring/Makefile config.status: creating lib/hpke/Makefile config.status: creating po/Makefile.in config.status: creating src/Makefile config.status: creating src/gl/Makefile config.status: creating src/gl/tests/Makefile config.status: creating tests/Makefile config.status: creating tests/windows/Makefile config.status: creating tests/cert-tests/Makefile config.status: creating tests/slow/Makefile config.status: creating tests/suite/Makefile config.status: creating fuzz/Makefile config.status: creating config.h config.status: executing depfiles commands config.status: executing po-directories commands config.status: creating po/Makefile config.status: executing libtool commands configure: summary of build options: version: 3.8.13 shared 72:0:42 Host/Target system: riscv64-unknown-linux-gnu Build system: riscv64-unknown-linux-gnu Install prefix: /usr Compiler: gcc Valgrind: no CFlags: -march=rv64gc -mabi=lp64d -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fno-omit-frame-pointer -g -ffile-prefix-map=/build/gnutls/src=/usr/src/debug/gnutls -flto=auto Library types: Shared=yes, Static=no Local libtasn1: no Local unistring: no Use nettle-mini: no Documentation: yes (manpages: yes) configure: External hardware support: /dev/crypto: no AF_ALG support: no Hardware accel: none Padlock accel: no Random gen. variant: getrandom PKCS#11 support: yes TPM support: no TPM2 support: dlopen KTLS support: yes configure: TPM2 library: tss2-esys tss2-mu tss2-tctildr configure: Optional features: (note that included applications might not compile properly if features are disabled) SSL3.0 support: no SSL2.0 client hello: yes Allow SHA1 sign: no DTLS-SRTP support: yes ALPN support: yes OCSP support: yes SRP support: no PSK support: yes DHE support: yes ECDHE support: yes GOST support: yes Anon auth support: yes Heartbeat support: no IDNA support: IDNA 2008 (libidn2) Non-SuiteB curves: yes FIPS140 mode: no Strict DER time: yes Audit trace: no HPKE support: no configure: Optional libraries: C++ library: yes DANE library: no OpenSSL compat: yes configure: System files: Trust store pkcs11: pkcs11: Trust store dir: Trust store file: Blocklist file: CRL file: Configuration file: ${sysconfdir}/gnutls/config DNSSEC root key file: /etc/unbound/root.key configure: WARNING: *** *** The DNSSEC root key file in /etc/unbound/root.key was not found. *** This file is needed for the verification of DNSSEC responses. *** Use the command: unbound-anchor -a "/etc/unbound/root.key" *** to generate or update it. *** make all-recursive make[1]: Entering directory '/build/gnutls/src/gnutls-3.8.13' Making all in gl make[2]: Entering directory '/build/gnutls/src/gnutls-3.8.13/gl' GEN alloca.h GEN arpa/inet.h GEN fcntl.h GEN malloc/scratch_buffer.gl.h GEN inttypes.h GEN limits.h GEN locale.h GEN netdb.h GEN pthread.h GEN sched.h GEN stdckdint.h GEN stddef.h GEN stdio.h GEN stdlib.h GEN string.h GEN strings.h GEN sys/socket.h GEN sys/stat.h GEN sys/time.h GEN sys/types.h GEN sys/uio.h GEN time.h GEN uchar.h GEN unicase.h GEN unictype.h GEN uninorm.h GEN unistd.h GEN unitypes.h GEN uniwidth.h GEN wchar.h GEN wctype.h make all-recursive make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.13/gl' make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.13/gl' CC libgnu_la-arpa_inet.lo CC libgnu_la-gl_array_list.lo CC libgnu_la-basename-lgpl.lo CC libgnu_la-c-ctype.lo CC libgnu_la-c-strcasecmp.lo CC libgnu_la-c-strncasecmp.lo CC libgnu_la-c32isalnum.lo CC libgnu_la-c32isalpha.lo CC libgnu_la-c32isblank.lo CC libgnu_la-c32iscntrl.lo CC libgnu_la-c32isdigit.lo CC libgnu_la-c32isgraph.lo CC libgnu_la-c32islower.lo CC libgnu_la-c32isprint.lo CC libgnu_la-c32ispunct.lo CC libgnu_la-c32isspace.lo CC libgnu_la-c32isupper.lo CC libgnu_la-c32isxdigit.lo CC libgnu_la-c32tolower.lo CC libgnu_la-c32width.lo CC libgnu_la-cloexec.lo CC libgnu_la-dirname-lgpl.lo CC libgnu_la-stripslash.lo CC libgnu_la-fcntl.lo CC libgnu_la-fd-hook.lo CC libgnu_la-fseterr.lo CC libgnu_la-hard-locale.lo CC libgnu_la-hashcode-mem.lo CC libgnu_la-gl_linkedhash_list.lo CC libgnu_la-gl_list.lo CC libgnu_la-localcharset.lo CC libgnu_la-malloca.lo CC libgnu_la-mbchar.lo CC libgnu_la-mbiterf.lo CC libgnu_la-mbrtoc32.lo CC libgnu_la-mbrtowc.lo CC libgnu_la-mbsnlen.lo CC libgnu_la-mbszero.lo CC libgnu_la-memeq.lo CC glthread/libgnu_la-once.lo CC libgnu_la-gl_rbtree_list.lo CC libgnu_la-read-file.lo CC libgnu_la-realloc.lo CC libgnu_la-setlocale_null-unlocked.lo CC libgnu_la-setlocale_null.lo CC libgnu_la-stat-time.lo CC libgnu_la-stdlib.lo CC libgnu_la-streq.lo CC libgnu_la-strnul.lo CC libgnu_la-sys_socket.lo CC glthread/libgnu_la-threadlib.lo CC glthread/libgnu_la-tls.lo CC libgnu_la-unistd.lo CC libgnu_la-vsnzprintf.lo CC libgnu_la-wctype-h.lo CC libgnu_la-xsize.lo CC libgnu_la-asnprintf.lo CC libgnu_la-printf-args.lo CC libgnu_la-printf-parse.lo CC libgnu_la-vasnprintf.lo CC malloc/libgnu_la-scratch_buffer_grow.lo CC malloc/libgnu_la-scratch_buffer_grow_preserve.lo CC malloc/libgnu_la-scratch_buffer_set_array_size.lo CC glthread/libgnu_la-lock.lo CC unicase/libgnu_la-tolower.lo CC unictype/libgnu_la-ctype_alnum.lo CC unictype/libgnu_la-ctype_alpha.lo CC unictype/libgnu_la-ctype_blank.lo CC unictype/libgnu_la-ctype_cntrl.lo CC unictype/libgnu_la-ctype_digit.lo CC unictype/libgnu_la-ctype_graph.lo CC unictype/libgnu_la-ctype_lower.lo CC unictype/libgnu_la-ctype_print.lo CC unictype/libgnu_la-ctype_punct.lo CC unictype/libgnu_la-ctype_space.lo CC unictype/libgnu_la-ctype_upper.lo CC unictype/libgnu_la-ctype_xdigit.lo CC uniwidth/libgnu_la-width.lo CCLD libgnu.la make[4]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/gl' make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/gl' make[2]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/gl' Making all in lib make[2]: Entering directory '/build/gnutls/src/gnutls-3.8.13/lib' make all-recursive make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.13/lib' Making all in includes make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.13/lib/includes' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/lib/includes' Making all in x509 make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.13/lib/x509' make all-am make[5]: Entering directory '/build/gnutls/src/gnutls-3.8.13/lib/x509' CC common.lo CC key_encode.lo CC key_decode.lo CC time.lo CC crl.lo CC crl_write.lo CC crq.lo CC dn.lo CC attributes.lo CC prov-seed.lo CC extensions.lo CC mpi.lo CC output.lo CC pkcs12.lo CC pkcs12_encr.lo CC pkcs12_bag.lo CC pkcs7.lo CC pkcs7-attrs.lo CC pkcs7-crypt.lo CC privkey.lo CC privkey_pkcs8.lo CC privkey_pkcs8_pbes1.lo CC privkey_openssl.lo CC hostname-verify.lo CC sign.lo CC verify.lo CC x509.lo CC x509_dn.lo CC x509_write.lo CC name_constraints.lo CC verify-high.lo CC verify-high2.lo CC x509_ext.lo CC email-verify.lo CC pkcs7-output.lo CC virt-san.lo CC spki.lo CC tls_features.lo CC krb5.lo CC ip.lo CC ocsp.lo CC ocsp_output.lo CCLD libgnutls_x509.la make[5]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/lib/x509' make[4]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/lib/x509' Making all in auth make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.13/lib/auth' CC anon.lo CC cert.lo CC dh_common.lo CC dhe.lo CC rsa_psk.lo CC dhe_psk.lo CC psk.lo CC psk_passwd.lo CC rsa.lo CC srp_kx.lo CC srp_passwd.lo CC srp_rsa.lo CC srp_sb64.lo CC anon_ecdh.lo CC ecdhe.lo CC vko_gost.lo cert.c: In function 'get_issuers': cert.c:390:69: warning: parameter 'data_size' set but not used [-Wunused-but-set-parameter=] 390 | int issuers_len, const uint8_t *data, size_t data_size) | ~~~~~~~^~~~~~~~~ CCLD libgnutls_auth.la make[4]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/lib/auth' Making all in ext make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.13/lib/ext' CC max_record.lo CC server_name.lo CC signature.lo CC safe_renegotiation.lo CC session_ticket.lo CC srp.lo CC heartbeat.lo CC status_request.lo CC dumbfw.lo CC ext_master_secret.lo CC etm.lo CC supported_versions.lo CC post_handshake.lo CC key_share.lo CC cookie.lo CC psk_ke_modes.lo CC pre_shared_key.lo CC supported_groups.lo CC ec_point_formats.lo CC early_data.lo CC record_size_limit.lo CC client_cert_type.lo CC server_cert_type.lo CC compress_certificate.lo CC alpn.lo CC srtp.lo CCLD libgnutls_ext.la make[4]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/lib/ext' Making all in algorithms make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.13/lib/algorithms' CC cert_types.lo CC ciphers.lo CC ciphersuites.lo CC ecc.lo CC kx.lo CC mac.lo CC protocols.lo CC publickey.lo CC secparams.lo CC sign.lo CC groups.lo CCLD libgnutls_alg.la make[4]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/lib/algorithms' Making all in extras make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.13/lib/extras' CC randomart.lo CC hex.lo CCLD libgnutls_extras.la make[4]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/lib/extras' Making all in accelerated make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.13/lib/accelerated' make[5]: Entering directory '/build/gnutls/src/gnutls-3.8.13/lib/accelerated' CC accelerated.lo CC cryptodev.lo CC cryptodev-gcm.lo CC afalg.lo CCLD libaccelerated.la make[5]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/lib/accelerated' make[4]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/lib/accelerated' Making all in hpke make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.13/lib/hpke' CC hpke-api.lo CCLD libgnutls_hpke.la make[4]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/lib/hpke' Making all in pkcs11 make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.13/lib/pkcs11' CC p11_provider.lo CC p11_cipher.lo CC p11_pk.lo CC p11_mac.lo CCLD libgnutls_pkcs11.la make[4]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/lib/pkcs11' Making all in nettle make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.13/lib/nettle' CC pk.lo CC mpi.lo CC mac.lo CC cipher.lo CC init.lo CC prf.lo CC rnd.lo CC sysrng-linux.lo CC rnd-fuzzer.lo CC gost_keywrap.lo CC int/rsa-keygen-fips186.lo CC int/provable-prime.lo CC int/dsa-keygen-fips186.lo CC int/dsa-validate.lo CC int/tls1-prf.lo CC int/dsa-compute-k.lo CC int/ecdsa-compute-k.lo CC int/mpn-base256.lo CC int/rsa-pad.lo CC gost/write-le32.lo CC gost/gost28147.lo CC gost/gost-wrap.lo CC gost/bignum-le.lo CC gost/gostdsa-mask.lo CC gost/magma.lo CC gost/kuznyechik.lo CC gost/acpkm.lo CC gost/cmac-magma.lo CC gost/cmac-kuznyechik.lo cc1: warning: ./backport: No such file or directory [-Wmissing-include-dirs] cc1: warning: ./backport: No such file or directory [-Wmissing-include-dirs] cc1: warning: ./backport: No such file or directory [-Wmissing-include-dirs] cc1: warning: ./backport: No such file or directory [-Wmissing-include-dirs] cc1: warning: ./backport: No such file or directory [-Wmissing-include-dirs] cc1: warning: ./backport: No such file or directory [-Wmissing-include-dirs] cc1: warning: ./backport: No such file or directory [-Wmissing-include-dirs] cc1: warning: ./backport: No such file or directory [-Wmissing-include-dirs] cc1: warning: ./backport: No such file or directory [-Wmissing-include-dirs] cc1: warning: ./backport: No such file or directory [-Wmissing-include-dirs] cc1: warning: ./backport: No such file or directory [-Wmissing-include-dirs] cc1: warning: ./backport: No such file or directory [-Wmissing-include-dirs] cc1: warning: ./backport: No such file or directory [-Wmissing-include-dirs] cc1: warning: ./backport: No such file or directory [-Wmissing-include-dirs] cc1: warning: ./backport: No such file or directory [-Wmissing-include-dirs] cc1: warning: ./backport: No such file or directory [-Wmissing-include-dirs] cc1: warning: ./backport: No such file or directory [-Wmissing-include-dirs] cc1: warning: ./backport: No such file or directory [-Wmissing-include-dirs] cc1: warning: ./backport: No such file or directory [-Wmissing-include-dirs] cc1: warning: ./backport: No such file or directory [-Wmissing-include-dirs] cc1: warning: ./backport: No such file or directory [-Wmissing-include-dirs] cc1: warning: ./backport: No such file or directory [-Wmissing-include-dirs] cc1: warning: ./backport: No such file or directory [-Wmissing-include-dirs] cc1: warning: ./backport: No such file or directory [-Wmissing-include-dirs] cc1: warning: ./backport: No such file or directory [-Wmissing-include-dirs] cc1: warning: ./backport: No such file or directory [-Wmissing-include-dirs] cc1: warning: ./backport: No such file or directory [-Wmissing-include-dirs] cc1: warning: ./backport: No such file or directory [-Wmissing-include-dirs] cc1: warning: ./backport: No such file or directory [-Wmissing-include-dirs] CCLD libcrypto.la make[4]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/lib/nettle' make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.13/lib' CC range.lo CC record.lo CC debug.lo CC compress.lo CC cipher.lo CC handshake-tls13.lo CC mbuffers.lo CC buffers.lo CC handshake.lo CC errors.lo CC dh.lo CC kx.lo CC cipher-cbc.lo CC priority.lo CC hash_int.lo CC cipher_int.lo CC session.lo CC db.lo CC x509_b64.lo CC hello_ext.lo CC auth.lo CC sslv2_compat.lo CC datum.lo CC session_pack.lo CC mpi.lo CC pk.lo CC global.lo CC cert-cred.lo CC constate.lo CC anon_cred.lo CC pkix_asn1_tab.lo CC gnutls_asn1_tab.lo CC mem.lo CC fingerprint.lo CC tls-sig.lo CC ecc.lo CC alert.lo CC privkey_raw.lo CC str-iconv.lo CC system.lo CC profiles.lo CC str.lo CC str-idna.lo CC str-unicode.lo CC state.lo CC cert-cred-x509.lo CC file.lo CC supplemental.lo CC random.lo CC crypto-api.lo CC privkey.lo CC pcert.lo CC pubkey.lo CC locks.lo CC dtls.lo CC system_override.lo CC crypto-backend.lo CC verify-tofu.lo CC pin.lo CC tpm.lo CC fips.lo CC safe-memfuncs.lo CC atfork.lo CC randomart.lo CC urls.lo CC prf.lo CC auto-verify.lo CC dh-session.lo CC cert-session.lo CC handshake-checks.lo CC dtls-sw.lo CC dh-primes.lo CC openpgp_compat.lo CC crypto-selftests.lo CC crypto-selftests-pk.lo CC secrets.lo CC extv.lo CC hello_ext_lib.lo CC ocsp-api.lo CC stek.lo CC cert-cred-rawpk.lo CC iov.lo CC pathbuf.lo CC system/ktls.lo CC audit.lo CC vko.lo CC system/keys-dummy.lo CC tls13-sig.lo CC pkcs11.lo CC pkcs11x.lo CC pkcs11_privkey.lo CC pkcs11_secret.lo CC pkcs11_int.lo CC srp.lo CC psk.lo CC pkcs11_write.lo CXX libgnutlsxx_la-gnutlsxx.lo CC system/certs.lo CC system/threads.lo CC system/fastopen.lo CC system/sockets.lo CC inih/ini.lo CC dlwrap/zlib.lo CC dlwrap/zstd.lo CC dlwrap/brotlienc.lo CC dlwrap/brotlidec.lo CC tpm2/tpm2.lo CC tpm2/tpm2_esys.lo CC tpm2/callbacks/esys_crypto_callbacks.lo CC tpm2/callbacks/aes/aes_callbacks.lo CC tpm2/callbacks/ecdh/ecdh_callbacks.lo CC tpm2/callbacks/random/random_callbacks.lo CC tpm2/callbacks/hmac/hmac_callbacks.lo CC tpm2/callbacks/hash/hash_callbacks.lo CC tpm2/callbacks/rsa/rsa_callbacks.lo CC dlwrap/tss2_mu.lo CC dlwrap/tss2_esys.lo CC dlwrap/tss2_tctildr.lo CC tls13/encrypted_extensions.lo CC tls13/certificate_request.lo CC tls13/finished.lo CC tls13/certificate_verify.lo CC tls13/key_update.lo CC tls13/session_ticket.lo CC tls13/hello_retry.lo CC tls13/certificate.lo CC tls13/early_data.lo CC tls13/post_handshake.lo CC tls13/psk_ext_parser.lo CC tls13/anti_replay.lo crypto-api.c:504:14: warning: no previous prototype for '_gnutls_pkcs7_unpad' [-Wmissing-prototypes] 504 | unsigned int _gnutls_pkcs7_unpad(const uint8_t *block, unsigned int block_size) | ^~~~~~~~~~~~~~~~~~~ kx.c:49:1: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant] 49 | GNUTLS_STATIC_MUTEX(keylog_mutex); | ^~~~~~~~~~~~~~~~~~~ kx.c:49:1: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant] verify-tofu.c:38:1: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant] 38 | GNUTLS_STATIC_MUTEX(file_mutex); | ^~~~~~~~~~~~~~~~~~~ verify-tofu.c:38:1: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant] system/ktls.c: In function '_gnutls_ktls_send_control_msg': system/ktls.c:937:39: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant] 937 | struct msghdr msg = { 0 }; | ^ system/ktls.c: In function '_gnutls_ktls_recv_control_msg': system/ktls.c:1020:31: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant] 1020 | struct msghdr msg = { 0 }; | ^ pkcs11.c:61:1: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant] 61 | GNUTLS_STATIC_MUTEX(pkcs11_mutex); | ^~~~~~~~~~~~~~~~~~~ pkcs11.c:61:1: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant] pkcs11.c: In function 'pkcs11_provider_init': pkcs11.c:284:26: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 284 | if (params && (p = strstr(params, "p11-kit:")) != NULL) { | ^ random.c:49:1: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant] 49 | GNUTLS_STATIC_MUTEX(gnutls_rnd_list_mutex); | ^~~~~~~~~~~~~~~~~~~ random.c:49:1: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant] global.c:211:1: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant] 211 | GNUTLS_STATIC_MUTEX(global_init_mutex); | ^~~~~~~~~~~~~~~~~~~ global.c:211:1: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant] tpm2/tpm2_esys.c:735:1: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant] 735 | GNUTLS_STATIC_MUTEX(tpm2_esys_init_mutex); | ^~~~~~~~~~~~~~~~~~~ tpm2/tpm2_esys.c:735:1: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant] CCLD libgnutls.la In function '_gnutls_handshake_sign_data', inlined from '_gnutls_gen_dhe_signature' at auth/cert.c:1770:14: tls-sig.c:205:9: warning: potential null pointer dereference [-Wnull-dereference] 205 | _gnutls_audit_new_context_with_data( | ^ tls-sig.c:205:9: warning: potential null pointer dereference [-Wnull-dereference] tls-sig.c:205:9: warning: potential null pointer dereference [-Wnull-dereference] tls-sig.c:205:9: warning: potential null pointer dereference [-Wnull-dereference] In function '_gnutls_asn1_encode_ecc', inlined from '_gnutls_asn1_encode_privkey' at x509/key_encode.c:1264:10: x509/key_encode.c:978:15: warning: potential null pointer dereference [-Wnull-dereference] 978 | if (ce->oid == NULL) | ^ x509/key_encode.c:978:15: warning: potential null pointer dereference [-Wnull-dereference] In function 'server_use_key_share_single', inlined from 'server_use_key_share' at ext/key_share.c:640:9, inlined from 'key_share_recv_params' at ext/key_share.c:904:11: ext/key_share.c:432:26: warning: potential null pointer dereference [-Wnull-dereference] 432 | if (curve->size * 2 + 1 > buffer->length) | ^ ext/key_share.c:432:26: warning: potential null pointer dereference [-Wnull-dereference] ext/key_share.c:478:26: warning: potential null pointer dereference [-Wnull-dereference] 478 | if (curve->size > buffer->length) | ^ ext/key_share.c:478:26: warning: potential null pointer dereference [-Wnull-dereference] CXXLD libgnutlsxx.la make[4]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/lib' make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/lib' make[2]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/lib' Making all in extra make[2]: Entering directory '/build/gnutls/src/gnutls-3.8.13/extra' Making all in includes make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.13/extra/includes' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/extra/includes' make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.13/extra' CC gnutls_openssl.lo CC openssl_compat.lo CCLD libgnutls-openssl.la /usr/bin/nm: libgnu_la-arpa_inet.o: no symbols /usr/bin/nm: libgnu_la-fd-hook.o: no symbols /usr/bin/nm: libgnu_la-stdlib.o: no symbols /usr/bin/nm: libgnu_la-sys_socket.o: no symbols /usr/bin/nm: libgnu_la-threadlib.o: no symbols /usr/bin/nm: libgnu_la-tls.o: no symbols /usr/bin/nm: libgnu_la-unistd.o: no symbols /usr/bin/nm: libgnu_la-wctype-h.o: no symbols make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/extra' make[2]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/extra' Making all in po make[2]: Entering directory '/build/gnutls/src/gnutls-3.8.13/po' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/po' Making all in src/gl make[2]: Entering directory '/build/gnutls/src/gnutls-3.8.13/src/gl' GEN alloca.h GEN arpa/inet.h GEN error.h GEN fcntl.h GEN malloc/scratch_buffer.gl.h GEN inttypes.h GEN limits.h GEN locale.h GEN netdb.h GEN pthread.h GEN sched.h GEN signal.h GEN stdckdint.h GEN stddef.h GEN stdio.h GEN stdlib.h GEN string.h GEN strings.h GEN sys/select.h GEN sys/socket.h GEN sys/stat.h GEN sys/time.h GEN sys/types.h GEN sys/uio.h GEN time.h GEN uchar.h GEN unicase.h GEN unictype.h GEN uninorm.h GEN unistd.h GEN unitypes.h GEN uniwidth.h GEN wchar.h GEN wctype.h make all-recursive make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.13/src/gl' Making all in . make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.13/src/gl' CC libgnu_gpl_la-arpa_inet.lo CC libgnu_gpl_la-gl_array_list.lo CC libgnu_gpl_la-basename-lgpl.lo CC libgnu_gpl_la-c-ctype.lo CC libgnu_gpl_la-c-strcasecmp.lo CC libgnu_gpl_la-c32isalnum.lo CC libgnu_gpl_la-c-strncasecmp.lo CC libgnu_gpl_la-c32isalpha.lo CC libgnu_gpl_la-c32isblank.lo CC libgnu_gpl_la-c32iscntrl.lo CC libgnu_gpl_la-c32isdigit.lo CC libgnu_gpl_la-c32isgraph.lo CC libgnu_gpl_la-c32islower.lo CC libgnu_gpl_la-c32isprint.lo CC libgnu_gpl_la-c32ispunct.lo CC libgnu_gpl_la-c32isspace.lo CC libgnu_gpl_la-c32isupper.lo CC libgnu_gpl_la-c32isxdigit.lo CC libgnu_gpl_la-c32tolower.lo CC libgnu_gpl_la-c32width.lo CC libgnu_gpl_la-cloexec.lo CC libgnu_gpl_la-close-stream.lo CC libgnu_gpl_la-exitfail.lo CC libgnu_gpl_la-fcntl.lo CC libgnu_gpl_la-fd-hook.lo CC libgnu_gpl_la-fseterr.lo CC libgnu_gpl_la-getprogname.lo CC libgnu_gpl_la-gettime.lo CC libgnu_gpl_la-hard-locale.lo CC libgnu_gpl_la-hashcode-mem.lo CC libgnu_gpl_la-ialloc.lo CC libgnu_gpl_la-gl_linked_list.lo CC libgnu_gpl_la-gl_list.lo CC libgnu_gpl_la-gl_linkedhash_list.lo CC libgnu_gpl_la-localcharset.lo CC libgnu_gpl_la-malloca.lo CC libgnu_gpl_la-mbchar.lo CC libgnu_gpl_la-mbiterf.lo CC libgnu_gpl_la-mbrtoc32.lo CC libgnu_gpl_la-mbrtowc.lo CC libgnu_gpl_la-mbsnlen.lo CC libgnu_gpl_la-mbszero.lo CC libgnu_gpl_la-memeq.lo CC libgnu_gpl_la-parse-datetime.lo CC libgnu_gpl_la-progname.lo CC libgnu_gpl_la-gl_rbtree_list.lo CC libgnu_gpl_la-read-file.lo CC libgnu_gpl_la-realloc.lo CC libgnu_gpl_la-reallocarray.lo CC libgnu_gpl_la-setlocale_null.lo CC libgnu_gpl_la-setlocale_null-unlocked.lo CC libgnu_gpl_la-sockets.lo CC libgnu_gpl_la-stdlib.lo CC libgnu_gpl_la-streq.lo CC libgnu_gpl_la-stat-time.lo CC libgnu_gpl_la-strnul.lo CC libgnu_gpl_la-sys_socket.lo CC libgnu_gpl_la-time_rz.lo CC libgnu_gpl_la-timespec.lo CC libgnu_gpl_la-unistd.lo CC libgnu_gpl_la-vsnzprintf.lo CC libgnu_gpl_la-wctype-h.lo CC libgnu_gpl_la-xmalloc.lo CC libgnu_gpl_la-xalloc-die.lo CC libgnu_gpl_la-gl_xlist.lo CC libgnu_gpl_la-xsize.lo CC libgnu_gpl_la-asnprintf.lo CC libgnu_gpl_la-mktime.lo CC libgnu_gpl_la-printf-args.lo CC libgnu_gpl_la-printf-parse.lo CC libgnu_gpl_la-vasnprintf.lo CC malloc/libgnu_gpl_la-scratch_buffer_grow.lo CC malloc/libgnu_gpl_la-scratch_buffer_grow_preserve.lo CC malloc/libgnu_gpl_la-scratch_buffer_set_array_size.lo CC glthread/libgnu_gpl_la-lock.lo CC glthread/libgnu_gpl_la-once.lo CC glthread/libgnu_gpl_la-threadlib.lo CC glthread/libgnu_gpl_la-tls.lo CC unicase/libgnu_gpl_la-tolower.lo CC unictype/libgnu_gpl_la-ctype_alnum.lo CC unictype/libgnu_gpl_la-ctype_blank.lo CC unictype/libgnu_gpl_la-ctype_alpha.lo CC unictype/libgnu_gpl_la-ctype_cntrl.lo CC unictype/libgnu_gpl_la-ctype_digit.lo CC unictype/libgnu_gpl_la-ctype_graph.lo CC unictype/libgnu_gpl_la-ctype_lower.lo CC unictype/libgnu_gpl_la-ctype_print.lo CC unictype/libgnu_gpl_la-ctype_punct.lo CC unictype/libgnu_gpl_la-ctype_space.lo CC unictype/libgnu_gpl_la-ctype_upper.lo CC unictype/libgnu_gpl_la-ctype_xdigit.lo CC uniwidth/libgnu_gpl_la-width.lo CCLD libgnu_gpl.la make[4]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/src/gl' Making all in tests make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.13/src/gl/tests' ## ---------------------------------------------------- ## GEN ctype.h GEN endian.h GEN math.h GEN sys/ioctl.h ## ------------------- Gnulib tests ------------------- ## ## You can ignore compiler warnings in this directory. ## ## ---------------------------------------------------- ## make all-recursive make[5]: Entering directory '/build/gnutls/src/gnutls-3.8.13/src/gl/tests' Making all in . make[6]: Entering directory '/build/gnutls/src/gnutls-3.8.13/src/gl/tests' CC locale.o CC binary-io.o CC btoc32.o CC btowc.o CC c32tob.o CC concat-filename.o CC dtotimespec.o CC endian.o CC localename-table.o CC getlocalename_l-unsafe.o CC ioctl.o CC localename.o CC localename-environ.o CC localename-unsafe.o CC math.o CC nanosleep.o CC pthread-rwlock.o CC same-inode.o CC str_endswith.o CC str_startswith.o CC time.o CC timespec-add.o CC timespec-sub.o CC vma-iter.o CC xconcat-filename.o CC xgetcwd.o CC strerror_r.o CC test-localcharset.o CC glthread/thread.o AR libtests.a CCLD current-locale CCLD test-localcharset make[6]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/src/gl/tests' make[5]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/src/gl/tests' make[4]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/src/gl/tests' make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/src/gl' make[2]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/src/gl' Making all in src make[2]: Entering directory '/build/gnutls/src/gnutls-3.8.13/src' make all-am make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.13/src' CC psk.o CC psktool-options.lo CC cli-debug.o CC tests.o CC socket.o CC common.o CC gnutls-cli-debug-options.lo CC certtool.o CC certtool-common.o CC certtool-extras.o CC certtool-options.lo CC certtool-cfg.lo CC cfg.lo CC serv.o CC udp-serv.o CC gnutls-serv-options.lo CC cli.o CC benchmark-cipher.o CC benchmark.o CC benchmark-tls.o CC ocsptool-common.o CC gnutls-cli-options.lo CC ocsptool.o CC ocsptool-options.lo CC p11tool-p11tool.o CC p11tool-pkcs11.o CC p11tool-certtool-common.o CC p11tool-certtool-extras.o CC p11tool-common.o CC p11tool-options.lo CC systemkey.o CC systemkey-tool-options.lo CC dumpcfg-cfg.o CC danetool-options.lo ocsptool-common.c: In function 'host_from_url': ocsptool-common.c:60:16: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 60 | if ((p = strstr(url, "http://")) != NULL) { | ^ cli.c: In function 'host_from_url': cli.c:2226:16: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 2226 | if ((p = strstr(url, "http://")) != NULL) { | ^ serv.c: In function 'terminate': serv.c:1141:9: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result] 1141 | write(STDERR_FILENO, buf, p - buf); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ CCLD dumpcfg CCLD libcmd-psk.la CCLD libcmd-cli-debug.la CCLD libcmd-ocsp.la CCLD libcmd-serv.la CCLD libcmd-cli.la CCLD psktool CCLD gnutls-cli-debug CCLD libcerttool-cfg.la CCLD gnutls-serv CCLD ocsptool CCLD gnutls-cli CCLD libcmd-certtool.la CCLD libcmd-p11tool.la CCLD libcmd-systemkey.la CCLD libcmd-danetool.la psktool-options.c: In function 'process_options': psktool-options.c:172:11: warning: leak of file descriptor 'pfds[0]' [CWE-775] [-Wanalyzer-fd-leak] 172 | perror ("fork"); | ^ 'process_options': events 1-8 141 | if (optind < argc) | ^ | | | (1) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------+ 148 || if (HAVE_OPT(HELP)) || ~ ~ || | | || | (3) following 'false' branch... ->-+ |+->(2) ...to here | | | ...... | | |+----------------------------------------+ 153 || if (HAVE_OPT(MORE_HELP)) || ~ ~ || | | || | (5) following 'true' branch... ->-+ |+->(4) ...to here | | | ...... | | |+---------------------------------------+ 160 || pid_t pid; || ~ || | |+----->(6) ...to here ...... 163 | if (pipe (pfds) < 0) | ~ | | | (7) opened here as read-write | (8) when 'pipe' succeeds 'process_options': events 9-14 163 | if (pipe (pfds) < 0) | ^ | | | (9) following 'false' branch... ->-+ | | ...... | | |+--------------------------------------------+ 169 || pid = fork (); || ~ || | |+----->(10) ...to here 170 | if (pid < 0) | ~ | | | (11) following 'true' branch (when 'pid_61 < 0')... ->-+ | | | | |+----------------------------------------------------------------+ 171 || { 172 || perror ("fork"); || ~ || | |+--------->(12) ...to here | (13) if 'perror' throws an exception... | (14) 'pfds[0]' leaks here psktool-options.c:172:11: warning: leak of file descriptor 'pfds[1]' [CWE-775] [-Wanalyzer-fd-leak] 172 | perror ("fork"); | ^ 'process_options': events 1-8 141 | if (optind < argc) | ^ | | | (1) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------+ 148 || if (HAVE_OPT(HELP)) || ~ ~ || | | || | (3) following 'false' branch... ->-+ |+->(2) ...to here | | | ...... | | |+----------------------------------------+ 153 || if (HAVE_OPT(MORE_HELP)) || ~ ~ || | | || | (5) following 'true' branch... ->-+ |+->(4) ...to here | | | ...... | | |+---------------------------------------+ 160 || pid_t pid; || ~ || | |+----->(6) ...to here ...... 163 | if (pipe (pfds) < 0) | ~ | | | (7) opened here as read-write | (8) when 'pipe' succeeds 'process_options': events 9-14 163 | if (pipe (pfds) < 0) | ^ | | | (9) following 'false' branch... ->-+ | | ...... | | |+--------------------------------------------+ 169 || pid = fork (); || ~ || | |+----->(10) ...to here 170 | if (pid < 0) | ~ | | | (11) following 'true' branch (when 'pid_61 < 0')... ->-+ | | | | |+----------------------------------------------------------------+ 171 || { 172 || perror ("fork"); || ~ || | |+--------->(12) ...to here | (13) if 'perror' throws an exception... | (14) 'pfds[1]' leaks here psktool-options.c:178:11: warning: leak of file descriptor 'pfds[0]' [CWE-775] [-Wanalyzer-fd-leak] 178 | close (pfds[0]); | ^ 'process_options': events 1-8 141 | if (optind < argc) | ^ | | | (1) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------+ 148 || if (HAVE_OPT(HELP)) || ~ ~ || | | || | (3) following 'false' branch... ->-+ |+->(2) ...to here | | | ...... | | |+----------------------------------------+ 153 || if (HAVE_OPT(MORE_HELP)) || ~ ~ || | | || | (5) following 'true' branch... ->-+ |+->(4) ...to here | | | ...... | | |+---------------------------------------+ 160 || pid_t pid; || ~ || | |+----->(6) ...to here ...... 163 | if (pipe (pfds) < 0) | ~ | | | (7) opened here as read-write | (8) when 'pipe' succeeds 'process_options': events 9-16 163 | if (pipe (pfds) < 0) | ^ | | | (9) following 'false' branch... ->-+ | | ...... | | |+--------------------------------------------+ 169 || pid = fork (); || ~ || | |+----->(10) ...to here 170 | if (pid < 0) | ~ | | | (11) following 'false' branch (when 'pid_61 >= 0')... ->-+ | | ...... | | |+------------------------------------------------------------------+ 176 || if (pid == 0) || ~ ~ || | | || | (13) following 'true' branch (when 'pid_61 == 0')... ->-+ |+----->(12) ...to here | | | | | |+-----------------------------------------------------------------+ 177 || { 178 || close (pfds[0]); || ~ || | |+--------->(14) ...to here | (15) if 'close' throws an exception... | (16) 'pfds[0]' leaks here psktool-options.c:178:11: warning: leak of file descriptor 'pfds[1]' [CWE-775] [-Wanalyzer-fd-leak] 178 | close (pfds[0]); | ^ 'process_options': events 1-8 141 | if (optind < argc) | ^ | | | (1) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------+ 148 || if (HAVE_OPT(HELP)) || ~ ~ || | | || | (3) following 'false' branch... ->-+ |+->(2) ...to here | | | ...... | | |+----------------------------------------+ 153 || if (HAVE_OPT(MORE_HELP)) || ~ ~ || | | || | (5) following 'true' branch... ->-+ |+->(4) ...to here | | | ...... | | |+---------------------------------------+ 160 || pid_t pid; || ~ || | |+----->(6) ...to here ...... 163 | if (pipe (pfds) < 0) | ~ | | | (7) opened here as read-write | (8) when 'pipe' succeeds 'process_options': events 9-16 163 | if (pipe (pfds) < 0) | ^ | | | (9) following 'false' branch... ->-+ | | ...... | | |+--------------------------------------------+ 169 || pid = fork (); || ~ || | |+----->(10) ...to here 170 | if (pid < 0) | ~ | | | (11) following 'false' branch (when 'pid_61 >= 0')... ->-+ | | ...... | | |+------------------------------------------------------------------+ 176 || if (pid == 0) || ~ ~ || | | || | (13) following 'true' branch (when 'pid_61 == 0')... ->-+ |+----->(12) ...to here | | | | | |+-----------------------------------------------------------------+ 177 || { 178 || close (pfds[0]); || ~ || | |+--------->(14) ...to here | (15) if 'close' throws an exception... | (16) 'pfds[1]' leaks here psktool-options.c:180:11: warning: leak of file descriptor 'pfds[1]' [CWE-775] [-Wanalyzer-fd-leak] 180 | close (pfds[1]); | ^ 'process_options': events 1-8 141 | if (optind < argc) | ^ | | | (1) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------+ 148 || if (HAVE_OPT(HELP)) || ~ ~ || | | || | (3) following 'false' branch... ->-+ |+->(2) ...to here | | | ...... | | |+----------------------------------------+ 153 || if (HAVE_OPT(MORE_HELP)) || ~ ~ || | | || | (5) following 'true' branch... ->-+ |+->(4) ...to here | | | ...... | | |+---------------------------------------+ 160 || pid_t pid; || ~ || | |+----->(6) ...to here ...... 163 | if (pipe (pfds) < 0) | ~ | | | (7) opened here as read-write | (8) when 'pipe' succeeds 'process_options': events 9-16 163 | if (pipe (pfds) < 0) | ^ | | | (9) following 'false' branch... ->-+ | | ...... | | |+--------------------------------------------+ 169 || pid = fork (); || ~ || | |+----->(10) ...to here 170 | if (pid < 0) | ~ | | | (11) following 'false' branch (when 'pid_61 >= 0')... ->-+ | | ...... | | |+------------------------------------------------------------------+ 176 || if (pid == 0) || ~ ~ || | | || | (13) following 'true' branch (when 'pid_61 == 0')... ->-+ |+----->(12) ...to here | | | | | |+-----------------------------------------------------------------+ 177 || { 178 || close (pfds[0]); || ~ || | |+--------->(14) ...to here 179 | dup2 (pfds[1], STDOUT_FILENO); 180 | close (pfds[1]); | ~ | | | (15) if 'close' throws an exception... | (16) 'pfds[1]' leaks here psktool-options.c:189:11: warning: leak of file descriptor 'pfds[0]' [CWE-775] [-Wanalyzer-fd-leak] 189 | close (pfds[1]); | ^ 'process_options': events 1-8 141 | if (optind < argc) | ^ | | | (1) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------+ 148 || if (HAVE_OPT(HELP)) || ~ ~ || | | || | (3) following 'false' branch... ->-+ |+->(2) ...to here | | | ...... | | |+----------------------------------------+ 153 || if (HAVE_OPT(MORE_HELP)) || ~ ~ || | | || | (5) following 'true' branch... ->-+ |+->(4) ...to here | | | ...... | | |+---------------------------------------+ 160 || pid_t pid; || ~ || | |+----->(6) ...to here ...... 163 | if (pipe (pfds) < 0) | ~ | | | (7) opened here as read-write | (8) when 'pipe' succeeds 'process_options': events 9-16 163 | if (pipe (pfds) < 0) | ^ | | | (9) following 'false' branch... ->-+ | | ...... | | |+--------------------------------------------+ 169 || pid = fork (); || ~ || | |+----->(10) ...to here 170 | if (pid < 0) | ~ | | | (11) following 'false' branch (when 'pid_61 >= 0')... ->-+ | | ...... | | |+------------------------------------------------------------------+ 176 || if (pid == 0) || ~ ~ || | | || | (13) following 'false' branch (when 'pid_61 != 0')... ->-+ |+----->(12) ...to here | | | ...... | | |+------------------------------------------------------------------+ 186 || const char *args[2]; || ~ || | |+--------->(14) ...to here ...... 189 | close (pfds[1]); | ~ | | | (15) if 'close' throws an exception... | (16) 'pfds[0]' leaks here psktool-options.c:189:11: warning: leak of file descriptor 'pfds[1]' [CWE-775] [-Wanalyzer-fd-leak] 189 | close (pfds[1]); | ^ 'process_options': events 1-8 141 | if (optind < argc) | ^ | | | (1) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------+ 148 || if (HAVE_OPT(HELP)) || ~ ~ || | | || | (3) following 'false' branch... ->-+ |+->(2) ...to here | | | ...... | | |+----------------------------------------+ 153 || if (HAVE_OPT(MORE_HELP)) || ~ ~ || | | || | (5) following 'true' branch... ->-+ |+->(4) ...to here | | | ...... | | |+---------------------------------------+ 160 || pid_t pid; || ~ || | |+----->(6) ...to here ...... 163 | if (pipe (pfds) < 0) | ~ | | | (7) opened here as read-write | (8) when 'pipe' succeeds 'process_options': events 9-16 163 | if (pipe (pfds) < 0) | ^ | | | (9) following 'false' branch... ->-+ | | ...... | | |+--------------------------------------------+ 169 || pid = fork (); || ~ || | |+----->(10) ...to here 170 | if (pid < 0) | ~ | | | (11) following 'false' branch (when 'pid_61 >= 0')... ->-+ | | ...... | | |+------------------------------------------------------------------+ 176 || if (pid == 0) || ~ ~ || | | || | (13) following 'false' branch (when 'pid_61 != 0')... ->-+ |+----->(12) ...to here | | | ...... | | |+------------------------------------------------------------------+ 186 || const char *args[2]; || ~ || | |+--------->(14) ...to here ...... 189 | close (pfds[1]); | ~ | | | (15) if 'close' throws an exception... | (16) 'pfds[1]' leaks here psktool-options.c:191:11: warning: leak of file descriptor 'pfds[0]' [CWE-775] [-Wanalyzer-fd-leak] 191 | close (pfds[0]); | ^ 'process_options': events 1-8 141 | if (optind < argc) | ^ | | | (1) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------+ 148 || if (HAVE_OPT(HELP)) || ~ ~ || | | || | (3) following 'false' branch... ->-+ |+->(2) ...to here | | | ...... | | |+----------------------------------------+ 153 || if (HAVE_OPT(MORE_HELP)) || ~ ~ || | | || | (5) following 'true' branch... ->-+ |+->(4) ...to here | | | ...... | | |+---------------------------------------+ 160 || pid_t pid; || ~ || | |+----->(6) ...to here ...... 163 | if (pipe (pfds) < 0) | ~ | | | (7) opened here as read-write | (8) when 'pipe' succeeds 'process_options': events 9-16 163 | if (pipe (pfds) < 0) | ^ | | | (9) following 'false' branch... ->-+ | | ...... | | |+--------------------------------------------+ 169 || pid = fork (); || ~ || | |+----->(10) ...to here 170 | if (pid < 0) | ~ | | | (11) following 'false' branch (when 'pid_61 >= 0')... ->-+ | | ...... | | |+------------------------------------------------------------------+ 176 || if (pid == 0) || ~ ~ || | | || | (13) following 'false' branch (when 'pid_61 != 0')... ->-+ |+----->(12) ...to here | | | ...... | | |+------------------------------------------------------------------+ 186 || const char *args[2]; || ~ || | |+--------->(14) ...to here ...... 191 | close (pfds[0]); | ~ | | | (15) if 'close' throws an exception... | (16) 'pfds[0]' leaks here psk.c: In function 'write_key': psk.c:220:26: warning: leak of FILE 'fopen (passwd_file_63(D), "w")' [CWE-775] [-Wanalyzer-file-leak] 220 | tmp.size = strlen(username); | ^ 'write_key': events 1-16 181 | if (strlen(passwd_file) + 5 > sizeof(tmpname)) { | ^ | | | (1) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 186 || snprintf(tmpname, sizeof(tmpname), "%s.tmp", passwd_file); || ~ || | |+------->(2) ...to here 187 | 188 | if (stat(tmpname, &st) != -1) { | ~ | | | (3) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 193 || if (filecopy(passwd_file, tmpname) != 0) { || ~ ~ || | | || | (5) following 'false' branch... ->-+ |+------->(4) ...to here | | | ...... | | |+----------------------------------------------+ 199 || fp = fopen(passwd_file, "w"); || ~ ~ || | | || | (7) opened here |+------->(6) ...to here 200 | if (fp == NULL) { | ~ | | | (8) assuming 'fopen (passwd_file_63(D), "w")' is non-NULL | (9) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 206 || fp2 = fopen(tmpname, "r"); || ~ || | |+------->(10) ...to here 207 | if (fp2 == NULL) { | ~ | | | (11) following 'false' branch... ->-+ | | ...... | | |+-----------------------------------------------+ 215 || if (strcspn(username, ":\n") != strlen(username)) { || ~ ~ || | | || | (13) following 'true' branch... ->-+ |+------->(12) ...to here | | | | | |+----------------------------------------------+ 216 || char *new_data; || ~ || | |+--------------->(14) ...to here ...... 220 | tmp.size = strlen(username); | ~ | | | (16) 'fopen (passwd_file_63(D), "w")' leaks here; was opened at (7) 221 | 222 | ret = gnutls_hex_encode2(&tmp, &_username); | ~ | | | (15) if 'gnutls_hex_encode2' throws an exception... psk.c:220:26: warning: leak of FILE 'fopen (&tmpname, "r")' [CWE-775] [-Wanalyzer-file-leak] 220 | tmp.size = strlen(username); | ^ 'write_key': events 1-16 181 | if (strlen(passwd_file) + 5 > sizeof(tmpname)) { | ^ | | | (1) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 186 || snprintf(tmpname, sizeof(tmpname), "%s.tmp", passwd_file); || ~ || | |+------->(2) ...to here 187 | 188 | if (stat(tmpname, &st) != -1) { | ~ | | | (3) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 193 || if (filecopy(passwd_file, tmpname) != 0) { || ~ ~ || | | || | (5) following 'false' branch... ->-+ |+------->(4) ...to here | | | ...... | | |+----------------------------------------------+ 199 || fp = fopen(passwd_file, "w"); || ~ || | |+------->(6) ...to here 200 | if (fp == NULL) { | ~ | | | (7) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 206 || fp2 = fopen(tmpname, "r"); || ~ ~ || | | || | (9) opened here |+------->(8) ...to here 207 | if (fp2 == NULL) { | ~ | | | (10) assuming 'fopen (&tmpname, "r")' is non-NULL | (11) following 'false' branch... ->-+ | | ...... | | |+-----------------------------------------------+ 215 || if (strcspn(username, ":\n") != strlen(username)) { || ~ ~ || | | || | (13) following 'true' branch... ->-+ |+------->(12) ...to here | | | | | |+----------------------------------------------+ 216 || char *new_data; || ~ || | |+--------------->(14) ...to here ...... 220 | tmp.size = strlen(username); | ~ | | | (16) 'fopen (&tmpname, "r")' leaks here; was opened at (9) 221 | 222 | ret = gnutls_hex_encode2(&tmp, &_username); | ~ | | | (15) if 'gnutls_hex_encode2' throws an exception... psk.c:220:26: warning: leak of FILE 'fopen (passwd_file_63(D), "w")' [CWE-775] [-Wanalyzer-file-leak] 220 | tmp.size = strlen(username); | ^ 'write_key': events 1-18 181 | if (strlen(passwd_file) + 5 > sizeof(tmpname)) { | ^ | | | (1) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 186 || snprintf(tmpname, sizeof(tmpname), "%s.tmp", passwd_file); || ~ || | |+------->(2) ...to here 187 | 188 | if (stat(tmpname, &st) != -1) { | ~ | | | (3) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 193 || if (filecopy(passwd_file, tmpname) != 0) { || ~ ~ || | | || | (5) following 'false' branch... ->-+ |+------->(4) ...to here | | | ...... | | |+----------------------------------------------+ 199 || fp = fopen(passwd_file, "w"); || ~ ~ || | | || | (7) opened here |+------->(6) ...to here 200 | if (fp == NULL) { | ~ | | | (8) assuming 'fopen (passwd_file_63(D), "w")' is non-NULL | (9) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 206 || fp2 = fopen(tmpname, "r"); || ~ || | |+------->(10) ...to here 207 | if (fp2 == NULL) { | ~ | | | (11) following 'false' branch... ->-+ | | ...... | | |+-----------------------------------------------+ 215 || if (strcspn(username, ":\n") != strlen(username)) { || ~ ~ || | | || | (13) following 'true' branch... ->-+ |+------->(12) ...to here | | | | | |+----------------------------------------------+ 216 || char *new_data; || ~ || | |+--------------->(14) ...to here ...... 220 | tmp.size = strlen(username); | ~ | | | (18) 'fopen (passwd_file_63(D), "w")' leaks here; was opened at (7) ...... 223 | if (ret < 0) { | ~ | | | (15) following 'false' branch... ->-+ | | ...... | | |+-------------------------------------------------------+ 230 || new_size = xsum(_username.size, 2); || ~ || | |+--------------->(16) ...to here ...... 235 | new_data = gnutls_realloc(_username.data, new_size); | ~ | | | (17) if the called function throws an exception... psk.c:220:26: warning: leak of FILE 'fopen (&tmpname, "r")' [CWE-775] [-Wanalyzer-file-leak] 220 | tmp.size = strlen(username); | ^ 'write_key': events 1-18 181 | if (strlen(passwd_file) + 5 > sizeof(tmpname)) { | ^ | | | (1) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 186 || snprintf(tmpname, sizeof(tmpname), "%s.tmp", passwd_file); || ~ || | |+------->(2) ...to here 187 | 188 | if (stat(tmpname, &st) != -1) { | ~ | | | (3) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 193 || if (filecopy(passwd_file, tmpname) != 0) { || ~ ~ || | | || | (5) following 'false' branch... ->-+ |+------->(4) ...to here | | | ...... | | |+----------------------------------------------+ 199 || fp = fopen(passwd_file, "w"); || ~ || | |+------->(6) ...to here 200 | if (fp == NULL) { | ~ | | | (7) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 206 || fp2 = fopen(tmpname, "r"); || ~ ~ || | | || | (9) opened here |+------->(8) ...to here 207 | if (fp2 == NULL) { | ~ | | | (10) assuming 'fopen (&tmpname, "r")' is non-NULL | (11) following 'false' branch... ->-+ | | ...... | | |+-----------------------------------------------+ 215 || if (strcspn(username, ":\n") != strlen(username)) { || ~ ~ || | | || | (13) following 'true' branch... ->-+ |+------->(12) ...to here | | | | | |+----------------------------------------------+ 216 || char *new_data; || ~ || | |+--------------->(14) ...to here ...... 220 | tmp.size = strlen(username); | ~ | | | (18) 'fopen (&tmpname, "r")' leaks here; was opened at (9) ...... 223 | if (ret < 0) { | ~ | | | (15) following 'false' branch... ->-+ | | ...... | | |+-------------------------------------------------------+ 230 || new_size = xsum(_username.size, 2); || ~ || | |+--------------->(16) ...to here ...... 235 | new_data = gnutls_realloc(_username.data, new_size); | ~ | | | (17) if the called function throws an exception... psk.c:220:26: warning: leak of FILE 'fopen (passwd_file_63(D), "w")' [CWE-775] [-Wanalyzer-file-leak] 220 | tmp.size = strlen(username); | ^ 'write_key': events 1-20 181 | if (strlen(passwd_file) + 5 > sizeof(tmpname)) { | ^ | | | (1) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 186 || snprintf(tmpname, sizeof(tmpname), "%s.tmp", passwd_file); || ~ || | |+------->(2) ...to here 187 | 188 | if (stat(tmpname, &st) != -1) { | ~ | | | (3) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 193 || if (filecopy(passwd_file, tmpname) != 0) { || ~ ~ || | | || | (5) following 'false' branch... ->-+ |+------->(4) ...to here | | | ...... | | |+----------------------------------------------+ 199 || fp = fopen(passwd_file, "w"); || ~ ~ || | | || | (7) opened here |+------->(6) ...to here 200 | if (fp == NULL) { | ~ | | | (8) assuming 'fopen (passwd_file_63(D), "w")' is non-NULL | (9) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 206 || fp2 = fopen(tmpname, "r"); || ~ || | |+------->(10) ...to here 207 | if (fp2 == NULL) { | ~ | | | (11) following 'false' branch... ->-+ | | ...... | | |+-----------------------------------------------+ 215 || if (strcspn(username, ":\n") != strlen(username)) { || ~ ~ || | | || | (13) following 'true' branch... ->-+ |+------->(12) ...to here | | | | | |+----------------------------------------------+ 216 || char *new_data; || ~ || | |+--------------->(14) ...to here ...... 220 | tmp.size = strlen(username); | ~ | | | (20) 'fopen (passwd_file_63(D), "w")' leaks here; was opened at (7) ...... 223 | if (ret < 0) { | ~ | | | (15) following 'false' branch... ->-+ | | ...... | | |+-------------------------------------------------------+ 230 || new_size = xsum(_username.size, 2); || ~ || | |+--------------->(16) ...to here ...... 236 | if (!new_data) { | ~ | | | (17) following 'false' branch... ->-+ | | ...... | | |+-------------------------------------------------------+ 240 || memmove(new_data + 1, new_data, _username.size); || ~ || | |+--------------->(18) ...to here ...... 258 | ret = gnutls_hex_encode2(&tmp, &_key); | ~ | | | (19) if 'gnutls_hex_encode2' throws an exception... psk.c:220:26: warning: leak of FILE 'fopen (&tmpname, "r")' [CWE-775] [-Wanalyzer-file-leak] 220 | tmp.size = strlen(username); | ^ 'write_key': events 1-20 181 | if (strlen(passwd_file) + 5 > sizeof(tmpname)) { | ^ | | | (1) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 186 || snprintf(tmpname, sizeof(tmpname), "%s.tmp", passwd_file); || ~ || | |+------->(2) ...to here 187 | 188 | if (stat(tmpname, &st) != -1) { | ~ | | | (3) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 193 || if (filecopy(passwd_file, tmpname) != 0) { || ~ ~ || | | || | (5) following 'false' branch... ->-+ |+------->(4) ...to here | | | ...... | | |+----------------------------------------------+ 199 || fp = fopen(passwd_file, "w"); || ~ || | |+------->(6) ...to here 200 | if (fp == NULL) { | ~ | | | (7) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 206 || fp2 = fopen(tmpname, "r"); || ~ ~ || | | || | (9) opened here |+------->(8) ...to here 207 | if (fp2 == NULL) { | ~ | | | (10) assuming 'fopen (&tmpname, "r")' is non-NULL | (11) following 'false' branch... ->-+ | | ...... | | |+-----------------------------------------------+ 215 || if (strcspn(username, ":\n") != strlen(username)) { || ~ ~ || | | || | (13) following 'true' branch... ->-+ |+------->(12) ...to here | | | | | |+----------------------------------------------+ 216 || char *new_data; || ~ || | |+--------------->(14) ...to here ...... 220 | tmp.size = strlen(username); | ~ | | | (20) 'fopen (&tmpname, "r")' leaks here; was opened at (9) ...... 223 | if (ret < 0) { | ~ | | | (15) following 'false' branch... ->-+ | | ...... | | |+-------------------------------------------------------+ 230 || new_size = xsum(_username.size, 2); || ~ || | |+--------------->(16) ...to here ...... 236 | if (!new_data) { | ~ | | | (17) following 'false' branch... ->-+ | | ...... | | |+-------------------------------------------------------+ 240 || memmove(new_data + 1, new_data, _username.size); || ~ || | |+--------------->(18) ...to here ...... 258 | ret = gnutls_hex_encode2(&tmp, &_key); | ~ | | | (19) if 'gnutls_hex_encode2' throws an exception... psk.c:246:42: warning: leak of FILE 'fopen (passwd_file_63(D), "w")' [CWE-775] [-Wanalyzer-file-leak] 246 | _username.data = (void *)gnutls_strdup(username); | ^ 'write_key': events 1-16 181 | if (strlen(passwd_file) + 5 > sizeof(tmpname)) { | ^ | | | (1) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 186 || snprintf(tmpname, sizeof(tmpname), "%s.tmp", passwd_file); || ~ || | |+------->(2) ...to here 187 | 188 | if (stat(tmpname, &st) != -1) { | ~ | | | (3) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 193 || if (filecopy(passwd_file, tmpname) != 0) { || ~ ~ || | | || | (5) following 'false' branch... ->-+ |+------->(4) ...to here | | | ...... | | |+----------------------------------------------+ 199 || fp = fopen(passwd_file, "w"); || ~ ~ || | | || | (7) opened here |+------->(6) ...to here 200 | if (fp == NULL) { | ~ | | | (8) assuming 'fopen (passwd_file_63(D), "w")' is non-NULL | (9) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 206 || fp2 = fopen(tmpname, "r"); || ~ || | |+------->(10) ...to here 207 | if (fp2 == NULL) { | ~ | | | (11) following 'false' branch... ->-+ | | ...... | | |+-----------------------------------------------+ 215 || if (strcspn(username, ":\n") != strlen(username)) { || ~ ~ || | | || | (13) following 'false' branch... ->-+ |+------->(12) ...to here | | | ...... | | |+-----------------------------------------------+ 246 || _username.data = (void *)gnutls_strdup(username); || ~ ~ || | | || | (15) if the called function throws an exception... |+--------------->(14) ...to here (16) 'fopen (passwd_file_63(D), "w")' leaks here; was opened at (7) psk.c:246:42: warning: leak of FILE 'fopen (&tmpname, "r")' [CWE-775] [-Wanalyzer-file-leak] 246 | _username.data = (void *)gnutls_strdup(username); | ^ 'write_key': events 1-16 181 | if (strlen(passwd_file) + 5 > sizeof(tmpname)) { | ^ | | | (1) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 186 || snprintf(tmpname, sizeof(tmpname), "%s.tmp", passwd_file); || ~ || | |+------->(2) ...to here 187 | 188 | if (stat(tmpname, &st) != -1) { | ~ | | | (3) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 193 || if (filecopy(passwd_file, tmpname) != 0) { || ~ ~ || | | || | (5) following 'false' branch... ->-+ |+------->(4) ...to here | | | ...... | | |+----------------------------------------------+ 199 || fp = fopen(passwd_file, "w"); || ~ || | |+------->(6) ...to here 200 | if (fp == NULL) { | ~ | | | (7) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 206 || fp2 = fopen(tmpname, "r"); || ~ ~ || | | || | (9) opened here |+------->(8) ...to here 207 | if (fp2 == NULL) { | ~ | | | (10) assuming 'fopen (&tmpname, "r")' is non-NULL | (11) following 'false' branch... ->-+ | | ...... | | |+-----------------------------------------------+ 215 || if (strcspn(username, ":\n") != strlen(username)) { || ~ ~ || | | || | (13) following 'false' branch... ->-+ |+------->(12) ...to here | | | ...... | | |+-----------------------------------------------+ 246 || _username.data = (void *)gnutls_strdup(username); || ~ ~ || | | || | (15) if the called function throws an exception... |+--------------->(14) ...to here (16) 'fopen (&tmpname, "r")' leaks here; was opened at (9) psk.c:246:42: warning: leak of FILE 'fopen (passwd_file_63(D), "w")' [CWE-775] [-Wanalyzer-file-leak] 246 | _username.data = (void *)gnutls_strdup(username); | ^ 'write_key': events 1-18 181 | if (strlen(passwd_file) + 5 > sizeof(tmpname)) { | ^ | | | (1) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 186 || snprintf(tmpname, sizeof(tmpname), "%s.tmp", passwd_file); || ~ || | |+------->(2) ...to here 187 | 188 | if (stat(tmpname, &st) != -1) { | ~ | | | (3) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 193 || if (filecopy(passwd_file, tmpname) != 0) { || ~ ~ || | | || | (5) following 'false' branch... ->-+ |+------->(4) ...to here | | | ...... | | |+----------------------------------------------+ 199 || fp = fopen(passwd_file, "w"); || ~ ~ || | | || | (7) opened here |+------->(6) ...to here 200 | if (fp == NULL) { | ~ | | | (8) assuming 'fopen (passwd_file_63(D), "w")' is non-NULL | (9) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 206 || fp2 = fopen(tmpname, "r"); || ~ || | |+------->(10) ...to here 207 | if (fp2 == NULL) { | ~ | | | (11) following 'false' branch... ->-+ | | ...... | | |+-----------------------------------------------+ 215 || if (strcspn(username, ":\n") != strlen(username)) { || ~ ~ || | | || | (13) following 'false' branch... ->-+ |+------->(12) ...to here | | | ...... | | |+-----------------------------------------------+ 246 || _username.data = (void *)gnutls_strdup(username); || ~ ~ || | | |+--------------->(14) ...to here (18) 'fopen (passwd_file_63(D), "w")' leaks here; was opened at (7) 247 | if (!_username.data) { | ~ | | | (15) following 'false' branch... ->-+ | | ...... | | |+-------------------------------------------------------+ 251 || _username.size = strlen(username); || ~ || | |+--------------->(16) ...to here ...... 258 | ret = gnutls_hex_encode2(&tmp, &_key); | ~ | | | (17) if 'gnutls_hex_encode2' throws an exception... psk.c:246:42: warning: leak of FILE 'fopen (&tmpname, "r")' [CWE-775] [-Wanalyzer-file-leak] 246 | _username.data = (void *)gnutls_strdup(username); | ^ 'write_key': events 1-18 181 | if (strlen(passwd_file) + 5 > sizeof(tmpname)) { | ^ | | | (1) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 186 || snprintf(tmpname, sizeof(tmpname), "%s.tmp", passwd_file); || ~ || | |+------->(2) ...to here 187 | 188 | if (stat(tmpname, &st) != -1) { | ~ | | | (3) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 193 || if (filecopy(passwd_file, tmpname) != 0) { || ~ ~ || | | || | (5) following 'false' branch... ->-+ |+------->(4) ...to here | | | ...... | | |+----------------------------------------------+ 199 || fp = fopen(passwd_file, "w"); || ~ || | |+------->(6) ...to here 200 | if (fp == NULL) { | ~ | | | (7) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 206 || fp2 = fopen(tmpname, "r"); || ~ ~ || | | || | (9) opened here |+------->(8) ...to here 207 | if (fp2 == NULL) { | ~ | | | (10) assuming 'fopen (&tmpname, "r")' is non-NULL | (11) following 'false' branch... ->-+ | | ...... | | |+-----------------------------------------------+ 215 || if (strcspn(username, ":\n") != strlen(username)) { || ~ ~ || | | || | (13) following 'false' branch... ->-+ |+------->(12) ...to here | | | ...... | | |+-----------------------------------------------+ 246 || _username.data = (void *)gnutls_strdup(username); || ~ ~ || | | |+--------------->(14) ...to here (18) 'fopen (&tmpname, "r")' leaks here; was opened at (9) 247 | if (!_username.data) { | ~ | | | (15) following 'false' branch... ->-+ | | ...... | | |+-------------------------------------------------------+ 251 || _username.size = strlen(username); || ~ || | |+--------------->(16) ...to here ...... 258 | ret = gnutls_hex_encode2(&tmp, &_key); | ~ | | | (17) if 'gnutls_hex_encode2' throws an exception... copying selected object files to avoid basename conflicts... copying selected object files to avoid basename conflicts... copying selected object files to avoid basename conflicts... copying selected object files to avoid basename conflicts... CCLD p11tool CCLD systemkey CCLD certtool gl/parse-datetime.y: In function 'digits_to_date_time': gl/parse-datetime.y:273:1: warning: use of uninitialized value 'text_int.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 273 | digits_to_date_time (parser_control *pc, textint text_int) | ^ 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-51 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (51) following 'false' branch... ->-+ | | | | 'yyparse': events 52-59 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(52) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (53) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(54) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (55) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (57) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(56) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(58) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (59) calling 'yylex' from 'yyparse' | +--> 'yylex': events 60-61 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (60) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (61) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 62-65 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (62) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (63) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (65) following 'true' branch (when the strings are equal)... ->-+ | |+--->(64) ...to here | | | | | 'lookup_word': event 66 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(66) ...to here | <------+ | 'yylex': events 67-69 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (67) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (68) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(69) ...to here | <------+ | 'yyparse': events 70-75 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (70) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (71) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(72) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (73) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (75) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(74) ...to here | | | | | 'yyparse': events 76-77 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (77) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(76) ...to here | 'yyparse': events 78-86 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(78) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (79) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(80) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (81) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(82) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(84) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (85) following 'case 91:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2444 || case 91: /* number: tUNUMBER */ | || ~ | || | | |+->(86) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:1010:9: | 1010 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (87) calling 'digits_to_date_time' from 'yyparse' | +--> 'digits_to_date_time': events 88-90 | | 273 | digits_to_date_time (parser_control *pc, textint text_int) | | ^ ~ | | | | | | (88) entry to 'digits_to_date_time' (89) region created on stack here | | (90) use of uninitialized value 'text_int.value' here | gl/parse-datetime.y: In function 'apply_relative_time': gl/parse-datetime.y:313:1: warning: use of uninitialized value 'rel.month' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 313 | apply_relative_time (parser_control *pc, relative_time rel, int factor) | ^ 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-51 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (51) following 'false' branch... ->-+ | | | | 'yyparse': events 52-59 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(52) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (53) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(54) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (55) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (57) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(56) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(58) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (59) calling 'yylex' from 'yyparse' | +--> 'yylex': events 60-61 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (60) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (61) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 62-65 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (62) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (63) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (65) following 'true' branch (when the strings are equal)... ->-+ | |+--->(64) ...to here | | | | | 'lookup_word': event 66 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(66) ...to here | <------+ | 'yylex': events 67-69 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (67) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (68) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(69) ...to here | <------+ | 'yyparse': events 70-75 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (70) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (71) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(72) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (73) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (75) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(74) ...to here | | | | | 'yyparse': events 76-77 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (77) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(76) ...to here | 'yyparse': events 78-86 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(78) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (79) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(80) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (81) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(82) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(84) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (85) following 'case 55:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2253 || case 55: /* rel: relunit */ | || ~ | || | | |+->(86) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:920:15: | 920 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (87) calling 'apply_relative_time' from 'yyparse' | +--> 'apply_relative_time': events 88-90 | | 313 | apply_relative_time (parser_control *pc, relative_time rel, int factor) | | ^ ~ | | | | | | (88) entry to 'apply_relative_time' (89) region created on stack here | | (90) use of uninitialized value 'rel.month' here | gl/parse-datetime.c: In function 'yyparse': gl/parse-datetime.c:1806:12: warning: use of uninitialized value 'yylval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1806 | *++yyvsp = yylval; | ^ 'parse_datetime_body': events 1-6 | |gl/parse-datetime.y:1767:1: | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-17 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1601 | YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); | | ~ | | | | | (15) region created on stack here | | (16) capacity: 56 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (17) following 'false' branch... ->-+ | | | | 'yyparse': events 18-25 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(18) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (19) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(20) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (21) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (23) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(22) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(24) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (25) calling 'yylex' from 'yyparse' | +--> 'yylex': events 26-27 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (26) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (27) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 28-29 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (28) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(29) ...to here | <-------------+ | 'yyparse': events 30-35 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (30) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (31) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(32) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (33) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (35) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(34) ...to here | | | | | 'yyparse': events 36-37 | | | | | |+-----------------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(36) ...to here |...... | 1806 | *++yyvsp = yylval; | | ~ | | | | | (37) use of uninitialized value 'yylval' here | gl/parse-datetime.c:1839:9: warning: use of uninitialized value '*_14' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1839 | yyval = yyvsp[1-yylen]; | ^ 'parse_datetime_body': events 1-6 | |gl/parse-datetime.y:1767:1: | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-22 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (20) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(21) ...to here |...... | 1839 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (22) use of uninitialized value '*_14' here | gl/parse-datetime.c:1839:9: warning: use of uninitialized value '*_14' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1839 | yyval = yyvsp[1-yylen]; | ^ 'parse_datetime_body': events 1-6 | |gl/parse-datetime.y:1767:1: | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-24 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (24) calling 'yylex' from 'yyparse' | +--> 'yylex': events 25-26 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (25) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (26) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 27-28 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (27) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(28) ...to here | <-------------+ | 'yyparse': events 29-34 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (29) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1839 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (34) use of uninitialized value '*_14' here | gl/parse-datetime.c:1839:9: warning: use of uninitialized value '*_14' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1839 | yyval = yyvsp[1-yylen]; | ^ 'parse_datetime': events 1-2 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(69) ...to here |...... | 1839 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (70) use of uninitialized value '*_14' here | gl/parse-datetime.y:616:21: warning: use of uninitialized value 'yyvsp_221->timespec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 616 | pc->seconds = $2; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 4:' branch... ->-+ | | | | | | | |+----------------------------------------+ | 1844 || { | 1845 || case 4: /* timespec: '@' seconds */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:616:21: | 616 | pc->seconds = $2; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->timespec' here | gl/parse-datetime.y:688:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 688 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 19:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1942 || case 19: /* time: tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:688:9: | 688 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:688:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:688:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 19:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1942 || case 19: /* time: tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:688:9: | 688 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:689:33: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 689 | pc->meridian = $2; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 19:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1942 || case 19: /* time: tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:689:33: | 689 | pc->meridian = $2; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:693:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:693:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:693:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:693:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:693:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (82) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:693:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:693:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:694:33: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 694 | pc->meridian = $4; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:694:33: | 694 | pc->meridian = $4; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |264 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:698:105: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:698:105: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:105: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:698:105: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:698:105: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:698:134: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:698:134: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:134: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:699:33: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 699 | pc->meridian = $6; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:699:33: | 699 | pc->meridian = $6; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:707:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 707 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 23:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1969 || case 23: /* iso_8601_time: tUNUMBER zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:707:9: | 707 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:707:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:707:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 23:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1969 || case 23: /* iso_8601_time: tUNUMBER zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:707:9: | 707 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:712:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:712:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:712:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:712:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:712:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (82) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:712:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:712:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |264 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:717:105: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:717:105: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:105: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:717:105: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:717:105: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:717:134: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:717:134: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:134: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:731:15: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 731 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 28:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1996 || case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:731:15: | 731 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:731:15: warning: use of uninitialized value '_59->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 28:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1996 || case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:731:15: | 731 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (82) use of uninitialized value '_59->textintval' here | gl/parse-datetime.y:754:36: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 754 | { pc->local_isdst = $1; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 29:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2005 || case 29: /* local_zone: tLOCAL_ZONE */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:754:36: | 754 | { pc->local_isdst = $1; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:766:34: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 766 | { pc->time_zone = $1; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 31:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2020 || case 31: /* zone: tZONE */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:766:34: | 766 | { pc->time_zone = $1; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:770:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 770 | { pc->time_zone = $1; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 33:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2032 || case 33: /* zone: tZONE relunit_snumber */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:770:35: | 770 | { pc->time_zone = $1; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:770:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:770:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 33:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2032 || case 33: /* zone: tZONE relunit_snumber */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:770:35: | 770 | { pc->time_zone = $1; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:771:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 771 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 33:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2032 || case 33: /* zone: tZONE relunit_snumber */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:771:15: | 771 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->rel' here | gl/parse-datetime.y:776:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 776 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 34:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2041 || case 34: /* zone: 'T' relunit_snumber */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:776:15: | 776 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->rel' here | gl/parse-datetime.y:780:15: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 35:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:780:15: | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:780:15: warning: use of uninitialized value '_72->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 35:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:780:15: | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (82) use of uninitialized value '_72->textintval' here | gl/parse-datetime.y:781:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 781 | if (ckd_add (&pc->time_zone, pc->time_zone, $1)) YYABORT; } | ^ 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 35:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(87) ...to here | 'yyparse': event 88 | |gl/parse-datetime.y:780:15: | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (88) calling 'time_zone_hhmm' from 'yyparse' | +--> 'time_zone_hhmm': events 89-91 | | 1234 | time_zone_hhmm (parser_control *pc, textint s, intmax_t mm) | | ^ | | | | | (89) entry to 'time_zone_hhmm' |...... | 1254 | if (overflow || ! (-24 * 60 <= n_minutes && n_minutes <= 24 * 60)) | | ~ | | | | | (90) following 'false' branch... ->-+ | | | | | | | |+---------------------------------------------------+ | 1255 || return false; | 1256 || pc->time_zone = n_minutes * 60; | || ~ | || | | |+->(91) ...to here | <------+ | 'yyparse': event 92 | | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (92) returning to 'yyparse' from 'time_zone_hhmm' | 'yyparse': events 93-95 | | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (93) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 781 || if (ckd_add (&pc->time_zone, pc->time_zone, $1)) YYABORT; } | || ~ ~ | || | | | || | (95) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | |+------->(94) ...to here | gl/parse-datetime.y:781:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 781 | if (ckd_add (&pc->time_zone, pc->time_zone, $1)) YYABORT; } | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:783:34: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 783 | { pc->time_zone = $1 + 60 * 60; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 36:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2057 || case 36: /* zone: tDAYZONE */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:783:34: | 783 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:785:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 785 | { pc->time_zone = $1 + 60 * 60; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 37:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2063 || case 37: /* zone: tZONE tDST */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:785:35: | 785 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:785:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:785:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 37:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2063 || case 37: /* zone: tZONE tDST */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:785:35: | 785 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:792:35: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 792 | pc->day_number = $1; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 38:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2069 || case 38: /* day: tDAY */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:792:35: | 792 | pc->day_number = $1; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:797:36: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 797 | pc->day_number = $1; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 39:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2078 || case 39: /* day: tDAY ',' */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:797:36: | 797 | pc->day_number = $1; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:797:36: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:797:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 39:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2078 || case 39: /* day: tDAY ',' */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:797:36: | 797 | pc->day_number = $1; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:801:37: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 801 | pc->day_ordinal = $1; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 40:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2087 || case 40: /* day: tORDINAL tDAY */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:801:37: | 801 | pc->day_ordinal = $1; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:801:37: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:801:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 40:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2087 || case 40: /* day: tORDINAL tDAY */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:801:37: | 801 | pc->day_ordinal = $1; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:802:35: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 802 | pc->day_number = $2; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 40:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2087 || case 40: /* day: tORDINAL tDAY */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:802:35: | 802 | pc->day_number = $2; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:807:49: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 807 | pc->day_ordinal = $1.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 41:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2097 || case 41: /* day: tUNUMBER tDAY */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:807:49: | 807 | pc->day_ordinal = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:807:49: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:807:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 41:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2097 || case 41: /* day: tUNUMBER tDAY */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:807:49: | 807 | pc->day_ordinal = $1.value; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:808:35: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 808 | pc->day_number = $2; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 41:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2097 || case 41: /* day: tUNUMBER tDAY */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:808:35: | 808 | pc->day_number = $2; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:816:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 816 | pc->month = $1.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:816:43: | 816 | pc->month = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:816:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:816:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:816:43: | 816 | pc->month = $1.value; | | ^ | | | | | (82) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:816:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:817:40: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 817 | pc->day = $3.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:817:40: | 817 | pc->day = $3.value; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:817:40: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(87) ...to here | 'yyparse': event 88 | |gl/parse-datetime.y:817:40: | 817 | pc->day = $3.value; | | ^ | | | | | (88) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:826:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 826 | if (4 <= $1.digits) | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:826:40: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) out-of-bounds read from byte -208 till byte -201 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:826:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------+ |read of 'idx_t' (8 bytes)| +-------------------------+ ^ | | +-------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +-------------------------+ +-------------------------------------+ |~~~~~~~~~~~~+~~~~~~~~~~~~||~+~~||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |200 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:826:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:826:40: | 826 | if (4 <= $1.digits) | | ^ | | | | | (82) out-of-bounds read from byte -152 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:826:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------+ |read of 'idx_t' (8 bytes)| +-------------------------+ ^ | | +-------------------------+ +----------+-------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +-------------------------+ +--------------------------------------+ |~~~~~~~~~~~~+~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |144 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:836:22: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 836 | pc->year = $1; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 836 | pc->year = $1; | | ~ | | | | | (38) out-of-bounds read from byte -224 till byte -201 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:836:22: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 836 | pc->year = $1; | ^ +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+----+ +--------+-------+ |under-read of 24 bytes| |200 bytes| |size: 1120 bytes| +----------------------+ +---------+ +----------------+ gl/parse-datetime.y:836:22: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': events 82-84 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (82) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(83) ...to here |...... | 836 | pc->year = $1; | | ~ | | | | | (84) out-of-bounds read from byte -168 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:836:22: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 836 | pc->year = $1; | ^ +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+----+ +--------+-------+ |under-read of 24 bytes| |144 bytes| |size: 1120 bytes| +----------------------+ +---------+ +----------------+ gl/parse-datetime.y:837:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 837 | pc->month = $3.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 837 | pc->month = $3.value; | | | | | | | (38) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:837:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 837 | pc->month = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:837:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': events 82-84 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (82) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(83) ...to here |...... | 837 | pc->month = $3.value; | | | | | | | (84) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:837:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 837 | pc->month = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:838:44: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 838 | pc->day = $5.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 838 | pc->day = $5.value; | | | | | | | (38) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:838:44: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 838 | pc->day = $5.value; | ^ 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(87) ...to here | 'yyparse': events 88-90 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (88) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(89) ...to here |...... | 838 | pc->day = $5.value; | | | | | | | (90) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:847:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 847 | pc->month = $1.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 847 | pc->month = $1.value; | | | | | | | (38) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 847 | pc->month = $1.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:847:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': events 82-84 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (82) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(83) ...to here |...... | 847 | pc->month = $1.value; | | | | | | | (84) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 847 | pc->month = $1.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:848:45: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 848 | pc->day = $3.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 848 | pc->day = $3.value; | | | | | | | (38) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:848:45: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 848 | pc->day = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:848:45: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': events 82-84 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (82) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(83) ...to here |...... | 848 | pc->day = $3.value; | | | | | | | (84) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:848:45: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 848 | pc->day = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:849:22: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 849 | pc->year = $5; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 849 | pc->year = $5; | | ~ | | | | | (38) use of uninitialized value 'yyvsp_221->textintval' here | gl/parse-datetime.y:855:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 855 | pc->day = $1.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:855:41: | 855 | pc->day = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:855:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:855:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:855:41: | 855 | pc->day = $1.value; | | ^ | | | | | (82) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:855:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:856:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 856 | pc->month = $3.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:856:43: | 856 | pc->month = $3.value; | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:856:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:856:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:856:43: | 856 | pc->month = $3.value; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:861:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 861 | pc->day = $1.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:861:41: | 861 | pc->day = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:861:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:861:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:861:41: | 861 | pc->day = $1.value; | | ^ | | | | | (82) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:861:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:862:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 862 | pc->month = $3.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:862:43: | 862 | pc->month = $3.value; | | ^ | | | | | (36) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:862:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:862:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:862:43: | 862 | pc->month = $3.value; | | ^ | | | | | (82) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:862:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:863:18: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 863 | pc->year = $5; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:863:18: | 863 | pc->year = $5; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval' here | gl/parse-datetime.y:868:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 868 | pc->day = $1.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:868:41: | 868 | pc->day = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:868:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:868:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:868:41: | 868 | pc->day = $1.value; | | ^ | | | | | (82) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:868:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:869:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 869 | pc->month = $2; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:869:31: | 869 | pc->month = $2; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:869:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:869:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:869:31: | 869 | pc->month = $2; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:870:13: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 870 | if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:870:13: | 870 | if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:876:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 876 | pc->month = $1; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:876:31: | 876 | pc->month = $1; | | ^ | | | | | (36) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:876:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |104 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:876:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:876:31: | 876 | pc->month = $1; | | ^ | | | | | (82) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:876:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:877:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:877:13: | 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:877:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:877:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:877:13: | 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:878:13: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 878 | if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:877:12: | 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | | ^ | | | | | (36) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------------+ | 878 || if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; | || ~ ~ | || | | | || | (38) use of uninitialized value 'yyvsp_221->textintval.value' here | |+------->(37) ...to here | gl/parse-datetime.y:883:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 883 | pc->month = $1; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 48:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2198 || case 48: /* date: tMONTH tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:883:31: | 883 | pc->month = $1; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:883:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:883:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 48:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2198 || case 48: /* date: tMONTH tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:883:31: | 883 | pc->month = $1; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:884:40: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 884 | pc->day = $2.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 48:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2198 || case 48: /* date: tMONTH tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:884:40: | 884 | pc->day = $2.value; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:888:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 888 | pc->month = $1; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:888:31: | 888 | pc->month = $1; | | ^ | | | | | (36) out-of-bounds read from byte -168 till byte -161 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:888:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |160 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:888:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:888:31: | 888 | pc->month = $1; | | ^ | | | | | (82) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:888:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |104 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:889:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 889 | pc->day = $2.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:889:41: | 889 | pc->day = $2.value; | | ^ | | | | | (36) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:889:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:889:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:889:41: | 889 | pc->day = $2.value; | | ^ | | | | | (82) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:889:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:890:18: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 890 | pc->year = $4; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:890:18: | 890 | pc->year = $4; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval' here | gl/parse-datetime.y:894:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 894 | pc->day = $1.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 50:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2217 || case 50: /* date: tUNUMBER tMONTH */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:894:41: | 894 | pc->day = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:894:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:894:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 50:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2217 || case 50: /* date: tUNUMBER tMONTH */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:894:41: | 894 | pc->day = $1.value; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:895:30: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 895 | pc->month = $2; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 50:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2217 || case 50: /* date: tUNUMBER tMONTH */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:895:30: | 895 | pc->month = $2; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:899:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 899 | pc->day = $1.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:899:41: | 899 | pc->day = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:899:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:899:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:899:41: | 899 | pc->day = $1.value; | | ^ | | | | | (82) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:899:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:900:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 900 | pc->month = $2; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:900:31: | 900 | pc->month = $2; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:900:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:900:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:900:31: | 900 | pc->month = $2; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:901:18: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 901 | pc->year = $3; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:901:18: | 901 | pc->year = $3; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval' here | gl/parse-datetime.y:910:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 910 | pc->year = $1; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:910:18: | 910 | pc->year = $1; | | ^ | | | | | (36) out-of-bounds read from byte -112 till byte -89 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:910:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+---+ +--------+-------+ |under-read of 24 bytes| |88 bytes| |size: 1120 bytes| +----------------------+ +--------+ +----------------+ gl/parse-datetime.y:910:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:910:18: | 910 | pc->year = $1; | | ^ | | | | | (82) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:910:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+---+ +--------+-------+ |under-read of 24 bytes| |32 bytes| |size: 1120 bytes| +----------------------+ +--------+ +----------------+ gl/parse-datetime.y:911:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:911:13: | 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:911:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:911:13: | 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:912:13: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 912 | if (ckd_sub (&pc->day, 0, $3.value)) YYABORT; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:911:12: | 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | | ^ | | | | | (36) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------------+ | 912 || if (ckd_sub (&pc->day, 0, $3.value)) YYABORT; | || ~ ~ | || | | | || | (38) use of uninitialized value 'yyvsp_221->textintval.value' here | |+------->(37) ...to here | gl/parse-datetime.y:918:15: warning: use of uninitialized value '_136->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 918 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | ^ 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 54:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2247 || case 54: /* rel: relunit tAGO */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:918:15: | 918 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (82) use of uninitialized value '_136->rel' here | gl/parse-datetime.y:918:66: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 918 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 54:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2247 || case 54: /* rel: relunit tAGO */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:918:66: | 918 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:920:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 920 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 55:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2253 || case 55: /* rel: relunit */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:920:15: | 920 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->rel' here | gl/parse-datetime.y:922:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 922 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 56:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2259 || case 56: /* rel: dayshift */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:922:15: | 922 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->rel' here | gl/parse-datetime.y:927:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 927 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 57:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2265 || case 57: /* relunit: tORDINAL tYEAR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:927:69: | 927 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:927:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:927:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 57:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2265 || case 57: /* relunit: tORDINAL tYEAR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:927:69: | 927 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:929:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 929 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 58:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2271 || case 58: /* relunit: tUNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:929:81: | 929 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:929:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:929:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 58:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2271 || case 58: /* relunit: tUNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:929:81: | 929 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:933:70: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 933 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 60:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2283 || case 60: /* relunit: tORDINAL tMONTH_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:933:70: | 933 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:933:70: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:933:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 60:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2283 || case 60: /* relunit: tORDINAL tMONTH_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:933:70: | 933 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:935:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 935 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 61:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2289 || case 61: /* relunit: tUNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:935:82: | 935 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:935:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:935:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 61:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2289 || case 61: /* relunit: tUNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:935:82: | 935 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:940:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 63:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2301 || case 63: /* relunit: tORDINAL tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:940:13: | 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:940:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:940:13: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 63:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2301 || case 63: /* relunit: tORDINAL tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:940:13: | 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:940:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 63:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2301 || case 63: /* relunit: tORDINAL tDAY_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:940:13: | 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:943:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 64:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2308 || case 64: /* relunit: tUNUMBER tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:943:13: | 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:943:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:943:13: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 64:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2308 || case 64: /* relunit: tUNUMBER tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:943:13: | 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:943:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 64:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2308 || case 64: /* relunit: tUNUMBER tDAY_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:943:13: | 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:945:67: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 945 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 65:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2315 || case 65: /* relunit: tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:945:67: | 945 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:947:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 947 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 66:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2321 || case 66: /* relunit: tORDINAL tHOUR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:947:69: | 947 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:947:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:947:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 66:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2321 || case 66: /* relunit: tORDINAL tHOUR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:947:69: | 947 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:949:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 949 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 67:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2327 || case 67: /* relunit: tUNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:949:81: | 949 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:949:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:949:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 67:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2327 || case 67: /* relunit: tUNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:949:81: | 949 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:953:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 69:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2339 || case 69: /* relunit: tORDINAL tMINUTE_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:953:72: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:953:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:953:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 69:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2339 || case 69: /* relunit: tORDINAL tMINUTE_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:953:72: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:955:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 955 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 70:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2345 || case 70: /* relunit: tUNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:955:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 70:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2345 || case 70: /* relunit: tUNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:959:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 959 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 72:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2357 || case 72: /* relunit: tORDINAL tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:959:72: | 959 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:959:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:959:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 72:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2357 || case 72: /* relunit: tORDINAL tSEC_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:959:72: | 959 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:961:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 961 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 73:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2363 || case 73: /* relunit: tUNUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:961:84: | 961 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:961:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:961:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 73:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2363 || case 73: /* relunit: tUNUMBER tSEC_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:961:84: | 961 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:963:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 74:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2369 || case 74: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:963:82: | 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:963:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:963:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 74:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2369 || case 74: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:963:82: | 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:963:128: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 74:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2369 || case 74: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:963:128: | 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:963:128: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:965:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 75:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2375 || case 75: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:965:82: | 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:965:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:965:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 75:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2375 || case 75: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:965:82: | 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:965:128: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 75:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2375 || case 75: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:965:128: | 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:965:128: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:973:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 973 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 78:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2387 || case 78: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:973:81: | 973 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:973:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:973:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 78:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2387 || case 78: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:973:81: | 973 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:975:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 975 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 79:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2393 || case 79: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:975:82: | 975 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:975:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:975:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 79:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2393 || case 79: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:975:82: | 975 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:978:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 80:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2399 || case 80: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:978:13: | 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:978:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:978:13: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 80:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2399 || case 80: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:978:13: | 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:978:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 80:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2399 || case 80: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:978:13: | 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:980:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 980 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 81:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2406 || case 81: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:980:81: | 980 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:980:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:980:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 81:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2406 || case 81: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:980:81: | 980 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:982:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 982 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 82:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2412 || case 82: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:982:84: | 982 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:982:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:982:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 82:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2412 || case 82: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:982:84: | 982 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:984:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 984 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 83:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2418 || case 83: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:984:84: | 984 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:984:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:984:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 83:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2418 || case 83: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:984:84: | 984 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:989:67: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 989 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 84:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2424 || case 84: /* dayshift: tDAY_SHIFT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:989:67: | 989 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:998:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 998 | $$ = (struct timespec) { .tv_sec = $1.value }; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 88:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2430 || case 88: /* signed_seconds: tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:998:79: | 998 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:998:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 88:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2430 || case 88: /* signed_seconds: tSNUMBER */ | || ~ | || | | |+->(87) ...to here | 'yyparse': event 88 | |gl/parse-datetime.y:998:79: | 998 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (88) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1005:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1005 | $$ = (struct timespec) { .tv_sec = $1.value }; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 90:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2437 || case 90: /* unsigned_seconds: tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:1005:79: | 1005 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1005:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 90:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2437 || case 90: /* unsigned_seconds: tUNUMBER */ | || ~ | || | | |+->(87) ...to here | 'yyparse': event 88 | |gl/parse-datetime.y:1005:79: | 1005 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (88) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1010:9: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1010 | { digits_to_date_time (pc, $1); } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 91:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2444 || case 91: /* number: tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:1010:9: | 1010 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval' here | gl/parse-datetime.y:1018:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 1018 | digits_to_date_time (pc, $1); | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 92:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2450 || case 92: /* hybrid: tUNUMBER relunit_snumber */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:1018:9: | 1018 | digits_to_date_time (pc, $1); | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:1018:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+---+ +--------+-------+ |under-read of 24 bytes| |32 bytes| |size: 1120 bytes| +----------------------+ +--------+ +----------------+ gl/parse-datetime.y:1018:9: warning: use of uninitialized value '_180->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 92:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2450 || case 92: /* hybrid: tUNUMBER relunit_snumber */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:1018:9: | 1018 | digits_to_date_time (pc, $1); | | ^ | | | | | (82) use of uninitialized value '_180->textintval' here | gl/parse-datetime.y:1027:47: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1027 | { $$ = $2.value; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 94:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2467 || case 94: /* o_colon_minutes: ':' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:1027:47: | 1027 | { $$ = $2.value; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1027:47: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 94:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2467 || case 94: /* o_colon_minutes: ':' tUNUMBER */ | || ~ | || | | |+->(87) ...to here | 'yyparse': event 88 | |gl/parse-datetime.y:1027:47: | 1027 | { $$ = $2.value; } | | ^ | | | | | (88) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.c:2601:12: warning: use of uninitialized value 'yylval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 2601 | *++yyvsp = yylval; | ^ 'parse_datetime_body': events 1-6 | |gl/parse-datetime.y:1767:1: | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-17 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1601 | YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); | | ~ | | | | | (15) region created on stack here | | (16) capacity: 56 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (17) following 'false' branch... ->-+ | | | | 'yyparse': events 18-25 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(18) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (19) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(20) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (21) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (23) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(22) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(24) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (25) calling 'yylex' from 'yyparse' | +--> 'yylex': events 26-27 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (26) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (27) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 28-29 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (28) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(29) ...to here | <-------------+ | 'yyparse': events 30-33 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (30) returning to 'yyparse' from 'yylex' |...... | 1819 | if (yyn == 0) | | ~ | | | | | (31) following 'true' branch (when 'yyn_250 == 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1820 || goto yyerrlab; | || ~ | || | | |+--->(32) ...to here |...... | 2518 | if (!yyerrstatus) | | ~ | | | | | (33) following 'true' branch (when 'yyerrstatus_214 == 0')... ->-+ | | | | 'yyparse': events 34-41 | | | | | |+----------------------------------------------------------------------+ | 2518 || if (!yyerrstatus) | || ^ | || | | |+---->(34) ...to here |...... | 2577 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (35) following 'true' branch (when 'yyn_397 != -93')... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 2578 || { | 2579 || yyn += YYSYMBOL_YYerror; | || ~ | || | | |+--------->(36) ...to here | 2580 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (37) following 'true' branch... ->-+ | | | | | | | |+------------------------------------------------+ | 2581 || { | 2582 || yyn = yytable[yyn]; | || ~ | || | | |+------------->(38) ...to here | 2583 | if (0 < yyn) | | ~ | | | | | (39) following 'true' branch (when 'yyn_399 > 0')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 2601 || *++yyvsp = yylval; | || ~ ~ | || | | | || | (41) use of uninitialized value 'yylval' here | |+->(40) ...to here | gl/parse-datetime.y: In function 'digits_to_date_time': gl/parse-datetime.y:273:1: warning: use of uninitialized value 'text_int.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 273 | digits_to_date_time (parser_control *pc, textint text_int) | ^ 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-51 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (51) following 'false' branch... ->-+ | | | | 'yyparse': events 52-59 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(52) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (53) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(54) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (55) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (57) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(56) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(58) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (59) calling 'yylex' from 'yyparse' | +--> 'yylex': events 60-61 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (60) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (61) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 62-65 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (62) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (63) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (65) following 'true' branch (when the strings are equal)... ->-+ | |+--->(64) ...to here | | | | | 'lookup_word': event 66 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(66) ...to here | <------+ | 'yylex': events 67-69 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (67) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (68) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(69) ...to here | <------+ | 'yyparse': events 70-75 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (70) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (71) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(72) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (73) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (75) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(74) ...to here | | | | | 'yyparse': events 76-77 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (77) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(76) ...to here | 'yyparse': events 78-86 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(78) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (79) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(80) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (81) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(82) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(84) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (85) following 'case 91:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2444 || case 91: /* number: tUNUMBER */ | || ~ | || | | |+->(86) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:1010:9: | 1010 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (87) calling 'digits_to_date_time' from 'yyparse' | +--> 'digits_to_date_time': events 88-90 | | 273 | digits_to_date_time (parser_control *pc, textint text_int) | | ^ ~ | | | | | | (88) entry to 'digits_to_date_time' (89) region created on stack here | | (90) use of uninitialized value 'text_int.value' here | gl/parse-datetime.y: In function 'apply_relative_time': gl/parse-datetime.y:313:1: warning: use of uninitialized value 'rel.month' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 313 | apply_relative_time (parser_control *pc, relative_time rel, int factor) | ^ 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-51 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (51) following 'false' branch... ->-+ | | | | 'yyparse': events 52-59 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(52) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (53) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(54) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (55) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (57) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(56) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(58) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (59) calling 'yylex' from 'yyparse' | +--> 'yylex': events 60-61 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (60) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (61) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 62-65 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (62) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (63) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (65) following 'true' branch (when the strings are equal)... ->-+ | |+--->(64) ...to here | | | | | 'lookup_word': event 66 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(66) ...to here | <------+ | 'yylex': events 67-69 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (67) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (68) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(69) ...to here | <------+ | 'yyparse': events 70-75 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (70) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (71) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(72) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (73) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (75) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(74) ...to here | | | | | 'yyparse': events 76-77 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (77) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(76) ...to here | 'yyparse': events 78-86 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(78) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (79) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(80) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (81) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(82) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(84) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (85) following 'case 55:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2253 || case 55: /* rel: relunit */ | || ~ | || | | |+->(86) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:920:15: | 920 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (87) calling 'apply_relative_time' from 'yyparse' | +--> 'apply_relative_time': events 88-90 | | 313 | apply_relative_time (parser_control *pc, relative_time rel, int factor) | | ^ ~ | | | | | | (88) entry to 'apply_relative_time' (89) region created on stack here | | (90) use of uninitialized value 'rel.month' here | gl/parse-datetime.c: In function 'yyparse': gl/parse-datetime.c:1806:12: warning: use of uninitialized value 'yylval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1806 | *++yyvsp = yylval; | ^ 'parse_datetime_body': events 1-6 | |gl/parse-datetime.y:1767:1: | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-17 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1601 | YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); | | ~ | | | | | (15) region created on stack here | | (16) capacity: 56 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (17) following 'false' branch... ->-+ | | | | 'yyparse': events 18-25 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(18) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (19) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(20) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (21) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (23) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(22) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(24) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (25) calling 'yylex' from 'yyparse' | +--> 'yylex': events 26-27 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (26) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (27) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 28-29 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (28) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(29) ...to here | <-------------+ | 'yyparse': events 30-35 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (30) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (31) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(32) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (33) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (35) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(34) ...to here | | | | | 'yyparse': events 36-37 | | | | | |+-----------------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(36) ...to here |...... | 1806 | *++yyvsp = yylval; | | ~ | | | | | (37) use of uninitialized value 'yylval' here | gl/parse-datetime.c:1839:9: warning: use of uninitialized value '*_14' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1839 | yyval = yyvsp[1-yylen]; | ^ 'parse_datetime_body': events 1-6 | |gl/parse-datetime.y:1767:1: | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-22 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (20) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(21) ...to here |...... | 1839 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (22) use of uninitialized value '*_14' here | gl/parse-datetime.c:1839:9: warning: use of uninitialized value '*_14' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1839 | yyval = yyvsp[1-yylen]; | ^ 'parse_datetime_body': events 1-6 | |gl/parse-datetime.y:1767:1: | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-24 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (24) calling 'yylex' from 'yyparse' | +--> 'yylex': events 25-26 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (25) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (26) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 27-28 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (27) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(28) ...to here | <-------------+ | 'yyparse': events 29-34 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (29) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1839 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (34) use of uninitialized value '*_14' here | gl/parse-datetime.c:1839:9: warning: use of uninitialized value '*_14' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1839 | yyval = yyvsp[1-yylen]; | ^ 'parse_datetime': events 1-2 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(69) ...to here |...... | 1839 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (70) use of uninitialized value '*_14' here | gl/parse-datetime.y:616:21: warning: use of uninitialized value 'yyvsp_221->timespec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 616 | pc->seconds = $2; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 4:' branch... ->-+ | | | | | | | |+----------------------------------------+ | 1844 || { | 1845 || case 4: /* timespec: '@' seconds */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:616:21: | 616 | pc->seconds = $2; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->timespec' here | gl/parse-datetime.y:688:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 688 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 19:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1942 || case 19: /* time: tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:688:9: | 688 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:688:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:688:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 19:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1942 || case 19: /* time: tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:688:9: | 688 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:689:33: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 689 | pc->meridian = $2; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 19:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1942 || case 19: /* time: tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:689:33: | 689 | pc->meridian = $2; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:693:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:693:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:693:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:693:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:693:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (82) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:693:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:693:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:694:33: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 694 | pc->meridian = $4; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:694:33: | 694 | pc->meridian = $4; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |264 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:698:105: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:698:105: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:105: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:698:105: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:698:105: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:698:134: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:698:134: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:134: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:699:33: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 699 | pc->meridian = $6; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:699:33: | 699 | pc->meridian = $6; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:707:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 707 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 23:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1969 || case 23: /* iso_8601_time: tUNUMBER zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:707:9: | 707 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:707:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:707:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 23:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1969 || case 23: /* iso_8601_time: tUNUMBER zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:707:9: | 707 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:712:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:712:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:712:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:712:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:712:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (82) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:712:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:712:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |264 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:717:105: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:717:105: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:105: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:717:105: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:717:105: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:717:134: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:717:134: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:134: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:731:15: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 731 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 28:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1996 || case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:731:15: | 731 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:731:15: warning: use of uninitialized value '_59->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 28:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1996 || case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:731:15: | 731 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (82) use of uninitialized value '_59->textintval' here | gl/parse-datetime.y:754:36: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 754 | { pc->local_isdst = $1; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 29:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2005 || case 29: /* local_zone: tLOCAL_ZONE */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:754:36: | 754 | { pc->local_isdst = $1; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:766:34: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 766 | { pc->time_zone = $1; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 31:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2020 || case 31: /* zone: tZONE */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:766:34: | 766 | { pc->time_zone = $1; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:770:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 770 | { pc->time_zone = $1; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 33:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2032 || case 33: /* zone: tZONE relunit_snumber */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:770:35: | 770 | { pc->time_zone = $1; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:770:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:770:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 33:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2032 || case 33: /* zone: tZONE relunit_snumber */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:770:35: | 770 | { pc->time_zone = $1; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:771:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 771 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 33:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2032 || case 33: /* zone: tZONE relunit_snumber */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:771:15: | 771 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->rel' here | gl/parse-datetime.y:776:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 776 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 34:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2041 || case 34: /* zone: 'T' relunit_snumber */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:776:15: | 776 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->rel' here | gl/parse-datetime.y:780:15: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 35:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:780:15: | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:780:15: warning: use of uninitialized value '_72->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 35:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:780:15: | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (82) use of uninitialized value '_72->textintval' here | gl/parse-datetime.y:781:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 781 | if (ckd_add (&pc->time_zone, pc->time_zone, $1)) YYABORT; } | ^ 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 35:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(87) ...to here | 'yyparse': event 88 | |gl/parse-datetime.y:780:15: | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (88) calling 'time_zone_hhmm' from 'yyparse' | +--> 'time_zone_hhmm': events 89-91 | | 1234 | time_zone_hhmm (parser_control *pc, textint s, intmax_t mm) | | ^ | | | | | (89) entry to 'time_zone_hhmm' |...... | 1254 | if (overflow || ! (-24 * 60 <= n_minutes && n_minutes <= 24 * 60)) | | ~ | | | | | (90) following 'false' branch... ->-+ | | | | | | | |+---------------------------------------------------+ | 1255 || return false; | 1256 || pc->time_zone = n_minutes * 60; | || ~ | || | | |+->(91) ...to here | <------+ | 'yyparse': event 92 | | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (92) returning to 'yyparse' from 'time_zone_hhmm' | 'yyparse': events 93-95 | | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (93) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 781 || if (ckd_add (&pc->time_zone, pc->time_zone, $1)) YYABORT; } | || ~ ~ | || | | | || | (95) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | |+------->(94) ...to here | gl/parse-datetime.y:781:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 781 | if (ckd_add (&pc->time_zone, pc->time_zone, $1)) YYABORT; } | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:783:34: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 783 | { pc->time_zone = $1 + 60 * 60; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 36:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2057 || case 36: /* zone: tDAYZONE */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:783:34: | 783 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:785:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 785 | { pc->time_zone = $1 + 60 * 60; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 37:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2063 || case 37: /* zone: tZONE tDST */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:785:35: | 785 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:785:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:785:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 37:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2063 || case 37: /* zone: tZONE tDST */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:785:35: | 785 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:792:35: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 792 | pc->day_number = $1; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 38:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2069 || case 38: /* day: tDAY */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:792:35: | 792 | pc->day_number = $1; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:797:36: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 797 | pc->day_number = $1; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 39:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2078 || case 39: /* day: tDAY ',' */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:797:36: | 797 | pc->day_number = $1; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:797:36: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:797:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 39:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2078 || case 39: /* day: tDAY ',' */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:797:36: | 797 | pc->day_number = $1; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:801:37: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 801 | pc->day_ordinal = $1; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 40:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2087 || case 40: /* day: tORDINAL tDAY */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:801:37: | 801 | pc->day_ordinal = $1; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:801:37: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:801:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 40:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2087 || case 40: /* day: tORDINAL tDAY */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:801:37: | 801 | pc->day_ordinal = $1; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:802:35: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 802 | pc->day_number = $2; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 40:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2087 || case 40: /* day: tORDINAL tDAY */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:802:35: | 802 | pc->day_number = $2; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:807:49: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 807 | pc->day_ordinal = $1.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 41:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2097 || case 41: /* day: tUNUMBER tDAY */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:807:49: | 807 | pc->day_ordinal = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:807:49: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:807:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 41:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2097 || case 41: /* day: tUNUMBER tDAY */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:807:49: | 807 | pc->day_ordinal = $1.value; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:808:35: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 808 | pc->day_number = $2; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 41:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2097 || case 41: /* day: tUNUMBER tDAY */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:808:35: | 808 | pc->day_number = $2; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:816:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 816 | pc->month = $1.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:816:43: | 816 | pc->month = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:816:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:816:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:816:43: | 816 | pc->month = $1.value; | | ^ | | | | | (82) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:816:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:817:40: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 817 | pc->day = $3.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:817:40: | 817 | pc->day = $3.value; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:817:40: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(87) ...to here | 'yyparse': event 88 | |gl/parse-datetime.y:817:40: | 817 | pc->day = $3.value; | | ^ | | | | | (88) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:826:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 826 | if (4 <= $1.digits) | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:826:40: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) out-of-bounds read from byte -208 till byte -201 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:826:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------+ |read of 'idx_t' (8 bytes)| +-------------------------+ ^ | | +-------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +-------------------------+ +-------------------------------------+ |~~~~~~~~~~~~+~~~~~~~~~~~~||~+~~||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |200 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:826:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:826:40: | 826 | if (4 <= $1.digits) | | ^ | | | | | (82) out-of-bounds read from byte -152 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:826:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------+ |read of 'idx_t' (8 bytes)| +-------------------------+ ^ | | +-------------------------+ +----------+-------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +-------------------------+ +--------------------------------------+ |~~~~~~~~~~~~+~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |144 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:836:22: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 836 | pc->year = $1; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 836 | pc->year = $1; | | ~ | | | | | (38) out-of-bounds read from byte -224 till byte -201 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:836:22: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 836 | pc->year = $1; | ^ +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+----+ +--------+-------+ |under-read of 24 bytes| |200 bytes| |size: 1120 bytes| +----------------------+ +---------+ +----------------+ gl/parse-datetime.y:836:22: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': events 82-84 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (82) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(83) ...to here |...... | 836 | pc->year = $1; | | ~ | | | | | (84) out-of-bounds read from byte -168 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:836:22: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 836 | pc->year = $1; | ^ +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+----+ +--------+-------+ |under-read of 24 bytes| |144 bytes| |size: 1120 bytes| +----------------------+ +---------+ +----------------+ gl/parse-datetime.y:837:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 837 | pc->month = $3.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 837 | pc->month = $3.value; | | | | | | | (38) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:837:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 837 | pc->month = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:837:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': events 82-84 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (82) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(83) ...to here |...... | 837 | pc->month = $3.value; | | | | | | | (84) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:837:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 837 | pc->month = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:838:44: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 838 | pc->day = $5.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 838 | pc->day = $5.value; | | | | | | | (38) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:838:44: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 838 | pc->day = $5.value; | ^ 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(87) ...to here | 'yyparse': events 88-90 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (88) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(89) ...to here |...... | 838 | pc->day = $5.value; | | | | | | | (90) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:847:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 847 | pc->month = $1.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 847 | pc->month = $1.value; | | | | | | | (38) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 847 | pc->month = $1.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:847:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': events 82-84 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (82) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(83) ...to here |...... | 847 | pc->month = $1.value; | | | | | | | (84) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 847 | pc->month = $1.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:848:45: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 848 | pc->day = $3.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 848 | pc->day = $3.value; | | | | | | | (38) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:848:45: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 848 | pc->day = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:848:45: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': events 82-84 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (82) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(83) ...to here |...... | 848 | pc->day = $3.value; | | | | | | | (84) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:848:45: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 848 | pc->day = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:849:22: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 849 | pc->year = $5; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 849 | pc->year = $5; | | ~ | | | | | (38) use of uninitialized value 'yyvsp_221->textintval' here | gl/parse-datetime.y:855:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 855 | pc->day = $1.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:855:41: | 855 | pc->day = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:855:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:855:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:855:41: | 855 | pc->day = $1.value; | | ^ | | | | | (82) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:855:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:856:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 856 | pc->month = $3.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:856:43: | 856 | pc->month = $3.value; | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:856:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:856:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:856:43: | 856 | pc->month = $3.value; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:861:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 861 | pc->day = $1.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:861:41: | 861 | pc->day = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:861:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:861:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:861:41: | 861 | pc->day = $1.value; | | ^ | | | | | (82) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:861:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:862:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 862 | pc->month = $3.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:862:43: | 862 | pc->month = $3.value; | | ^ | | | | | (36) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:862:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:862:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:862:43: | 862 | pc->month = $3.value; | | ^ | | | | | (82) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:862:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:863:18: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 863 | pc->year = $5; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:863:18: | 863 | pc->year = $5; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval' here | gl/parse-datetime.y:868:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 868 | pc->day = $1.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:868:41: | 868 | pc->day = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:868:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:868:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:868:41: | 868 | pc->day = $1.value; | | ^ | | | | | (82) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:868:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:869:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 869 | pc->month = $2; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:869:31: | 869 | pc->month = $2; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:869:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:869:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:869:31: | 869 | pc->month = $2; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:870:13: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 870 | if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:870:13: | 870 | if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:876:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 876 | pc->month = $1; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:876:31: | 876 | pc->month = $1; | | ^ | | | | | (36) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:876:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |104 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:876:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:876:31: | 876 | pc->month = $1; | | ^ | | | | | (82) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:876:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:877:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:877:13: | 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:877:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:877:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:877:13: | 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:878:13: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 878 | if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:877:12: | 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | | ^ | | | | | (36) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------------+ | 878 || if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; | || ~ ~ | || | | | || | (38) use of uninitialized value 'yyvsp_221->textintval.value' here | |+------->(37) ...to here | gl/parse-datetime.y:883:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 883 | pc->month = $1; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 48:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2198 || case 48: /* date: tMONTH tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:883:31: | 883 | pc->month = $1; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:883:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:883:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 48:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2198 || case 48: /* date: tMONTH tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:883:31: | 883 | pc->month = $1; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:884:40: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 884 | pc->day = $2.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 48:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2198 || case 48: /* date: tMONTH tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:884:40: | 884 | pc->day = $2.value; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:888:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 888 | pc->month = $1; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:888:31: | 888 | pc->month = $1; | | ^ | | | | | (36) out-of-bounds read from byte -168 till byte -161 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:888:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |160 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:888:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:888:31: | 888 | pc->month = $1; | | ^ | | | | | (82) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:888:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |104 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:889:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 889 | pc->day = $2.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:889:41: | 889 | pc->day = $2.value; | | ^ | | | | | (36) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:889:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:889:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:889:41: | 889 | pc->day = $2.value; | | ^ | | | | | (82) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:889:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:890:18: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 890 | pc->year = $4; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:890:18: | 890 | pc->year = $4; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval' here | gl/parse-datetime.y:894:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 894 | pc->day = $1.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 50:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2217 || case 50: /* date: tUNUMBER tMONTH */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:894:41: | 894 | pc->day = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:894:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:894:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 50:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2217 || case 50: /* date: tUNUMBER tMONTH */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:894:41: | 894 | pc->day = $1.value; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:895:30: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 895 | pc->month = $2; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 50:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2217 || case 50: /* date: tUNUMBER tMONTH */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:895:30: | 895 | pc->month = $2; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:899:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 899 | pc->day = $1.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:899:41: | 899 | pc->day = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:899:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:899:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:899:41: | 899 | pc->day = $1.value; | | ^ | | | | | (82) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:899:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:900:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 900 | pc->month = $2; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:900:31: | 900 | pc->month = $2; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:900:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:900:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:900:31: | 900 | pc->month = $2; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:901:18: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 901 | pc->year = $3; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:901:18: | 901 | pc->year = $3; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval' here | gl/parse-datetime.y:910:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 910 | pc->year = $1; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:910:18: | 910 | pc->year = $1; | | ^ | | | | | (36) out-of-bounds read from byte -112 till byte -89 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:910:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+---+ +--------+-------+ |under-read of 24 bytes| |88 bytes| |size: 1120 bytes| +----------------------+ +--------+ +----------------+ gl/parse-datetime.y:910:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:910:18: | 910 | pc->year = $1; | | ^ | | | | | (82) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:910:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+---+ +--------+-------+ |under-read of 24 bytes| |32 bytes| |size: 1120 bytes| +----------------------+ +--------+ +----------------+ gl/parse-datetime.y:911:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:911:13: | 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:911:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:911:13: | 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:912:13: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 912 | if (ckd_sub (&pc->day, 0, $3.value)) YYABORT; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:911:12: | 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | | ^ | | | | | (36) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------------+ | 912 || if (ckd_sub (&pc->day, 0, $3.value)) YYABORT; | || ~ ~ | || | | | || | (38) use of uninitialized value 'yyvsp_221->textintval.value' here | |+------->(37) ...to here | gl/parse-datetime.y:918:15: warning: use of uninitialized value '_136->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 918 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | ^ 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 54:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2247 || case 54: /* rel: relunit tAGO */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:918:15: | 918 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (82) use of uninitialized value '_136->rel' here | gl/parse-datetime.y:918:66: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 918 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 54:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2247 || case 54: /* rel: relunit tAGO */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:918:66: | 918 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:920:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 920 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 55:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2253 || case 55: /* rel: relunit */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:920:15: | 920 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->rel' here | gl/parse-datetime.y:922:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 922 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 56:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2259 || case 56: /* rel: dayshift */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:922:15: | 922 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->rel' here | gl/parse-datetime.y:927:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 927 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 57:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2265 || case 57: /* relunit: tORDINAL tYEAR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:927:69: | 927 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:927:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:927:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 57:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2265 || case 57: /* relunit: tORDINAL tYEAR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:927:69: | 927 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:929:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 929 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 58:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2271 || case 58: /* relunit: tUNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:929:81: | 929 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:929:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:929:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 58:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2271 || case 58: /* relunit: tUNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:929:81: | 929 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:933:70: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 933 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 60:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2283 || case 60: /* relunit: tORDINAL tMONTH_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:933:70: | 933 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:933:70: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:933:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 60:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2283 || case 60: /* relunit: tORDINAL tMONTH_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:933:70: | 933 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:935:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 935 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 61:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2289 || case 61: /* relunit: tUNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:935:82: | 935 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:935:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:935:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 61:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2289 || case 61: /* relunit: tUNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:935:82: | 935 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:940:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 63:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2301 || case 63: /* relunit: tORDINAL tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:940:13: | 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:940:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:940:13: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 63:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2301 || case 63: /* relunit: tORDINAL tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:940:13: | 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:940:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 63:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2301 || case 63: /* relunit: tORDINAL tDAY_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:940:13: | 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:943:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 64:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2308 || case 64: /* relunit: tUNUMBER tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:943:13: | 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:943:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:943:13: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 64:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2308 || case 64: /* relunit: tUNUMBER tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:943:13: | 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:943:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 64:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2308 || case 64: /* relunit: tUNUMBER tDAY_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:943:13: | 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:945:67: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 945 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 65:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2315 || case 65: /* relunit: tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:945:67: | 945 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:947:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 947 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 66:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2321 || case 66: /* relunit: tORDINAL tHOUR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:947:69: | 947 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:947:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:947:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 66:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2321 || case 66: /* relunit: tORDINAL tHOUR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:947:69: | 947 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:949:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 949 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 67:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2327 || case 67: /* relunit: tUNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:949:81: | 949 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:949:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:949:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 67:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2327 || case 67: /* relunit: tUNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:949:81: | 949 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:953:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 69:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2339 || case 69: /* relunit: tORDINAL tMINUTE_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:953:72: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:953:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:953:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 69:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2339 || case 69: /* relunit: tORDINAL tMINUTE_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:953:72: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:955:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 955 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 70:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2345 || case 70: /* relunit: tUNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:955:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 70:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2345 || case 70: /* relunit: tUNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:959:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 959 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 72:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2357 || case 72: /* relunit: tORDINAL tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:959:72: | 959 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:959:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:959:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 72:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2357 || case 72: /* relunit: tORDINAL tSEC_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:959:72: | 959 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:961:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 961 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 73:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2363 || case 73: /* relunit: tUNUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:961:84: | 961 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:961:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:961:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 73:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2363 || case 73: /* relunit: tUNUMBER tSEC_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:961:84: | 961 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:963:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 74:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2369 || case 74: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:963:82: | 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:963:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:963:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 74:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2369 || case 74: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:963:82: | 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:963:128: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 74:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2369 || case 74: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:963:128: | 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:963:128: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:965:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 75:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2375 || case 75: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:965:82: | 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:965:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:965:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 75:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2375 || case 75: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:965:82: | 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:965:128: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 75:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2375 || case 75: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:965:128: | 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:965:128: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:973:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 973 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 78:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2387 || case 78: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:973:81: | 973 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:973:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:973:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 78:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2387 || case 78: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:973:81: | 973 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:975:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 975 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 79:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2393 || case 79: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:975:82: | 975 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:975:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:975:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 79:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2393 || case 79: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:975:82: | 975 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:978:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 80:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2399 || case 80: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:978:13: | 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:978:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:978:13: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 80:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2399 || case 80: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:978:13: | 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:978:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 80:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2399 || case 80: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:978:13: | 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:980:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 980 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 81:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2406 || case 81: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:980:81: | 980 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:980:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:980:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 81:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2406 || case 81: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:980:81: | 980 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:982:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 982 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 82:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2412 || case 82: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:982:84: | 982 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:982:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:982:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 82:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2412 || case 82: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:982:84: | 982 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:984:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 984 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 83:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2418 || case 83: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:984:84: | 984 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:984:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:984:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 83:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2418 || case 83: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:984:84: | 984 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:989:67: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 989 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 84:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2424 || case 84: /* dayshift: tDAY_SHIFT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:989:67: | 989 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:998:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 998 | $$ = (struct timespec) { .tv_sec = $1.value }; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 88:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2430 || case 88: /* signed_seconds: tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:998:79: | 998 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:998:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 88:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2430 || case 88: /* signed_seconds: tSNUMBER */ | || ~ | || | | |+->(87) ...to here | 'yyparse': event 88 | |gl/parse-datetime.y:998:79: | 998 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (88) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1005:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1005 | $$ = (struct timespec) { .tv_sec = $1.value }; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 90:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2437 || case 90: /* unsigned_seconds: tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:1005:79: | 1005 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1005:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 90:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2437 || case 90: /* unsigned_seconds: tUNUMBER */ | || ~ | || | | |+->(87) ...to here | 'yyparse': event 88 | |gl/parse-datetime.y:1005:79: | 1005 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (88) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1010:9: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1010 | { digits_to_date_time (pc, $1); } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 91:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2444 || case 91: /* number: tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:1010:9: | 1010 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval' here | gl/parse-datetime.y:1018:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 1018 | digits_to_date_time (pc, $1); | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 92:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2450 || case 92: /* hybrid: tUNUMBER relunit_snumber */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:1018:9: | 1018 | digits_to_date_time (pc, $1); | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:1018:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+---+ +--------+-------+ |under-read of 24 bytes| |32 bytes| |size: 1120 bytes| +----------------------+ +--------+ +----------------+ gl/parse-datetime.y:1018:9: warning: use of uninitialized value '_180->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 92:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2450 || case 92: /* hybrid: tUNUMBER relunit_snumber */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:1018:9: | 1018 | digits_to_date_time (pc, $1); | | ^ | | | | | (82) use of uninitialized value '_180->textintval' here | gl/parse-datetime.y:1027:47: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1027 | { $$ = $2.value; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 94:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2467 || case 94: /* o_colon_minutes: ':' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:1027:47: | 1027 | { $$ = $2.value; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1027:47: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 94:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2467 || case 94: /* o_colon_minutes: ':' tUNUMBER */ | || ~ | || | | |+->(87) ...to here | 'yyparse': event 88 | |gl/parse-datetime.y:1027:47: | 1027 | { $$ = $2.value; } | | ^ | | | | | (88) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.c:2601:12: warning: use of uninitialized value 'yylval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 2601 | *++yyvsp = yylval; | ^ 'parse_datetime_body': events 1-6 | |gl/parse-datetime.y:1767:1: | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-17 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1601 | YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); | | ~ | | | | | (15) region created on stack here | | (16) capacity: 56 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (17) following 'false' branch... ->-+ | | | | 'yyparse': events 18-25 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(18) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (19) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(20) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (21) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (23) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(22) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(24) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (25) calling 'yylex' from 'yyparse' | +--> 'yylex': events 26-27 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (26) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (27) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 28-29 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (28) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(29) ...to here | <-------------+ | 'yyparse': events 30-33 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (30) returning to 'yyparse' from 'yylex' |...... | 1819 | if (yyn == 0) | | ~ | | | | | (31) following 'true' branch (when 'yyn_250 == 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1820 || goto yyerrlab; | || ~ | || | | |+--->(32) ...to here |...... | 2518 | if (!yyerrstatus) | | ~ | | | | | (33) following 'true' branch (when 'yyerrstatus_214 == 0')... ->-+ | | | | 'yyparse': events 34-41 | | | | | |+----------------------------------------------------------------------+ | 2518 || if (!yyerrstatus) | || ^ | || | | |+---->(34) ...to here |...... | 2577 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (35) following 'true' branch (when 'yyn_397 != -93')... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 2578 || { | 2579 || yyn += YYSYMBOL_YYerror; | || ~ | || | | |+--------->(36) ...to here | 2580 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (37) following 'true' branch... ->-+ | | | | | | | |+------------------------------------------------+ | 2581 || { | 2582 || yyn = yytable[yyn]; | || ~ | || | | |+------------->(38) ...to here | 2583 | if (0 < yyn) | | ~ | | | | | (39) following 'true' branch (when 'yyn_399 > 0')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 2601 || *++yyvsp = yylval; | || ~ ~ | || | | | || | (41) use of uninitialized value 'yylval' here | |+->(40) ...to here | gl/parse-datetime.y: In function 'digits_to_date_time': gl/parse-datetime.y:273:1: warning: use of uninitialized value 'text_int.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 273 | digits_to_date_time (parser_control *pc, textint text_int) | ^ 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-51 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (51) following 'false' branch... ->-+ | | | | 'yyparse': events 52-59 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(52) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (53) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(54) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (55) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (57) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(56) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(58) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (59) calling 'yylex' from 'yyparse' | +--> 'yylex': events 60-61 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (60) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (61) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 62-65 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (62) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (63) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (65) following 'true' branch (when the strings are equal)... ->-+ | |+--->(64) ...to here | | | | | 'lookup_word': event 66 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(66) ...to here | <------+ | 'yylex': events 67-69 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (67) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (68) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(69) ...to here | <------+ | 'yyparse': events 70-75 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (70) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (71) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(72) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (73) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (75) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(74) ...to here | | | | | 'yyparse': events 76-77 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (77) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(76) ...to here | 'yyparse': events 78-86 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(78) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (79) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(80) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (81) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(82) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(84) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (85) following 'case 91:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2444 || case 91: /* number: tUNUMBER */ | || ~ | || | | |+->(86) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:1010:9: | 1010 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (87) calling 'digits_to_date_time' from 'yyparse' | +--> 'digits_to_date_time': events 88-90 | | 273 | digits_to_date_time (parser_control *pc, textint text_int) | | ^ ~ | | | | | | (88) entry to 'digits_to_date_time' (89) region created on stack here | | (90) use of uninitialized value 'text_int.value' here | gl/parse-datetime.y: In function 'apply_relative_time': gl/parse-datetime.y:313:1: warning: use of uninitialized value 'rel.month' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 313 | apply_relative_time (parser_control *pc, relative_time rel, int factor) | ^ 'yyparse': events 1-2 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | | 'yyparse': events 3-10 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(3) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(5) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(7) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(9) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (10) calling 'yylex' from 'yyparse' | +--> 'yylex': events 11-12 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (11) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (12) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 13-16 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (13) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (14) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (16) following 'true' branch (when the strings are equal)... ->-+ | |+--->(15) ...to here | | | | | 'lookup_word': event 17 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(17) ...to here | <------+ | 'yylex': events 18-20 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (18) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (19) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(20) ...to here | <------+ | 'yyparse': events 21-26 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (21) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (22) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(23) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(25) ...to here | | | | | 'yyparse': events 27-28 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (28) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(27) ...to here | 'yyparse': events 29-37 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(29) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (30) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(31) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (32) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(33) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (34) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(35) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (36) following 'case 34:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2041 || case 34: /* zone: 'T' relunit_snumber */ | || ~ | || | | |+->(37) ...to here | 'yyparse': event 38 | |gl/parse-datetime.y:776:15: | 776 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | | ^ | | | | | (38) calling 'apply_relative_time' from 'yyparse' | +--> 'apply_relative_time': events 39-41 | | 313 | apply_relative_time (parser_control *pc, relative_time rel, int factor) | | ^ ~ | | | | | | (39) entry to 'apply_relative_time' (40) region created on stack here | | (41) use of uninitialized value 'rel.month' here | gl/parse-datetime.y:313:1: warning: use of uninitialized value 'rel.month' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-51 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (51) following 'false' branch... ->-+ | | | | 'yyparse': events 52-59 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(52) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (53) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(54) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (55) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (57) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(56) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(58) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (59) calling 'yylex' from 'yyparse' | +--> 'yylex': events 60-61 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (60) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (61) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 62-65 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (62) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (63) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (65) following 'true' branch (when the strings are equal)... ->-+ | |+--->(64) ...to here | | | | | 'lookup_word': event 66 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(66) ...to here | <------+ | 'yylex': events 67-69 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (67) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (68) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(69) ...to here | <------+ | 'yyparse': events 70-75 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (70) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (71) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(72) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (73) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (75) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(74) ...to here | | | | | 'yyparse': events 76-77 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (77) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(76) ...to here | 'yyparse': events 78-86 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(78) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (79) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(80) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (81) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(82) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(84) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (85) following 'case 55:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2253 || case 55: /* rel: relunit */ | || ~ | || | | |+->(86) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:920:15: | 920 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (87) calling 'apply_relative_time' from 'yyparse' | +--> 'apply_relative_time': events 88-90 | | 313 | apply_relative_time (parser_control *pc, relative_time rel, int factor) | | ^ ~ | | | | | | (88) entry to 'apply_relative_time' (89) region created on stack here | | (90) use of uninitialized value 'rel.month' here | gl/parse-datetime.c: In function 'yyparse': gl/parse-datetime.c:1806:12: warning: use of uninitialized value 'yylval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1806 | *++yyvsp = yylval; | ^ 'yyparse': events 1-4 | | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1601 | YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); | | ~ | | | | | (2) region created on stack here | | (3) capacity: 56 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | | 'yyparse': events 5-12 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(5) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (6) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(7) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (8) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (10) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(9) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(11) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (12) calling 'yylex' from 'yyparse' | +--> 'yylex': events 13-14 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (13) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (14) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 15-16 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (15) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(16) ...to here | <-------------+ | 'yyparse': events 17-22 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (17) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (18) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(19) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (20) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (22) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(21) ...to here | | | | | 'yyparse': events 23-24 | | | | | |+-----------------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(23) ...to here |...... | 1806 | *++yyvsp = yylval; | | ~ | | | | | (24) use of uninitialized value 'yylval' here | gl/parse-datetime.c:1806:12: warning: use of uninitialized value 'yylval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1806 | *++yyvsp = yylval; | ^ 'parse_datetime_body': events 1-6 | |gl/parse-datetime.y:1767:1: | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-17 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1601 | YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); | | ~ | | | | | (15) region created on stack here | | (16) capacity: 56 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (17) following 'false' branch... ->-+ | | | | 'yyparse': events 18-25 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(18) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (19) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(20) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (21) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (23) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(22) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(24) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (25) calling 'yylex' from 'yyparse' | +--> 'yylex': events 26-27 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (26) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (27) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 28-29 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (28) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(29) ...to here | <-------------+ | 'yyparse': events 30-35 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (30) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (31) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(32) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (33) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (35) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(34) ...to here | | | | | 'yyparse': events 36-37 | | | | | |+-----------------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(36) ...to here |...... | 1806 | *++yyvsp = yylval; | | ~ | | | | | (37) use of uninitialized value 'yylval' here | gl/parse-datetime.c:1839:9: warning: use of uninitialized value '*_14' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1839 | yyval = yyvsp[1-yylen]; | ^ 'yyparse': events 1-2 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-8 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1819 | if (yyn == 0) | ~ | | | (6) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1820 || goto yyerrlab; 1821 || goto yyreduce; || ~ || | |+->(7) ...to here ...... 1839 | yyval = yyvsp[1-yylen]; | ~ | | | (8) use of uninitialized value '*_14' here gl/parse-datetime.c:1839:9: warning: use of uninitialized value '*_14' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1839 | yyval = yyvsp[1-yylen]; | ^ 'yyparse': events 1-3 | | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (13) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 14-15 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (14) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(15) ...to here | <-------------+ | 'yyparse': events 16-21 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (16) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (17) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(18) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (19) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(20) ...to here |...... | 1839 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (21) use of uninitialized value '*_14' here | gl/parse-datetime.c:1839:9: warning: use of uninitialized value '*_14' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1839 | yyval = yyvsp[1-yylen]; | ^ 'parse_datetime_body': events 1-6 | |gl/parse-datetime.y:1767:1: | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-22 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (20) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(21) ...to here |...... | 1839 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (22) use of uninitialized value '*_14' here | gl/parse-datetime.c:1839:9: warning: use of uninitialized value '*_14' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1839 | yyval = yyvsp[1-yylen]; | ^ 'parse_datetime_body': events 1-6 | |gl/parse-datetime.y:1767:1: | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-24 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (24) calling 'yylex' from 'yyparse' | +--> 'yylex': events 25-26 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (25) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (26) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 27-28 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (27) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(28) ...to here | <-------------+ | 'yyparse': events 29-34 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (29) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1839 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (34) use of uninitialized value '*_14' here | gl/parse-datetime.c:1839:9: warning: use of uninitialized value '*_14' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1839 | yyval = yyvsp[1-yylen]; | ^ 'parse_datetime': events 1-2 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(69) ...to here |...... | 1839 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (70) use of uninitialized value '*_14' here | gl/parse-datetime.y:616:21: warning: use of uninitialized value 'yyvsp_221->timespec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 616 | pc->seconds = $2; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 4:' branch... ->-+ | | | | |+----------------------------------------+ 1844 || { 1845 || case 4: /* timespec: '@' seconds */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:616:21: 616 | pc->seconds = $2; | ^ | | | (22) use of uninitialized value 'yyvsp_221->timespec' here gl/parse-datetime.y:616:21: warning: use of uninitialized value 'yyvsp_221->timespec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 4:' branch... ->-+ | | | | | | | |+----------------------------------------+ | 1844 || { | 1845 || case 4: /* timespec: '@' seconds */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:616:21: | 616 | pc->seconds = $2; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->timespec' here | gl/parse-datetime.y:688:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 688 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 19:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1942 || case 19: /* time: tUNUMBER tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:688:9: 688 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:688:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:688:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 19:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1942 || case 19: /* time: tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:688:9: | 688 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:688:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 19:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1942 || case 19: /* time: tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:688:9: | 688 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:688:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:688:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 19:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1942 || case 19: /* time: tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:688:9: | 688 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:689:33: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 689 | pc->meridian = $2; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 19:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1942 || case 19: /* time: tUNUMBER tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:689:33: 689 | pc->meridian = $2; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:689:33: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 19:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1942 || case 19: /* time: tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:689:33: | 689 | pc->meridian = $2; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:693:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 20:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:693:9: 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ | | | (22) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:693:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:693:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 20:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:693:9: 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:693:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:693:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (39) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:693:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:693:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:693:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:693:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:693:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:693:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:693:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (82) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:693:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:693:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:694:33: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 694 | pc->meridian = $4; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 20:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:694:33: 694 | pc->meridian = $4; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:694:33: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:694:33: | 694 | pc->meridian = $4; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 21:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:698:9: 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |264 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 21:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:698:9: 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (39) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (39) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |264 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:698:105: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 21:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:698:105: 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:698:105: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:698:105: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:698:105: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:698:105: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:698:105: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:105: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:698:105: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:698:105: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:698:134: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 21:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:698:134: 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:698:134: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:698:134: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:698:134: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:134: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:699:33: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 699 | pc->meridian = $6; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 21:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:699:33: 699 | pc->meridian = $6; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:699:33: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:699:33: | 699 | pc->meridian = $6; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:707:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 707 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 23:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1969 || case 23: /* iso_8601_time: tUNUMBER zone_offset */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:707:9: 707 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:707:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:707:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 23:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1969 || case 23: /* iso_8601_time: tUNUMBER zone_offset */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:707:9: | 707 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:707:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 23:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1969 || case 23: /* iso_8601_time: tUNUMBER zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:707:9: | 707 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:707:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:707:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 23:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1969 || case 23: /* iso_8601_time: tUNUMBER zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:707:9: | 707 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:712:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 24:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:712:9: 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ | | | (22) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:712:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:712:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 24:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:712:9: 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:712:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:712:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (39) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:712:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:712:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:712:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:712:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:712:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:712:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:712:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (82) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:712:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:712:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 25:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:717:9: 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |264 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 25:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:717:9: 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (39) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (39) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |264 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:717:105: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 25:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:717:105: 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:717:105: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:717:105: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:717:105: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:717:105: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:717:105: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:105: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:717:105: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:717:105: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:717:134: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 25:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:717:134: 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:717:134: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:717:134: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:717:134: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:134: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:731:15: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 731 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 28:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1996 || case 28: /* zone_offset: tSNUMBER o_colon_minutes */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:731:15: 731 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:731:15: warning: use of uninitialized value '_59->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 28:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1996 || case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:731:15: | 731 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (39) use of uninitialized value '_59->textintval' here | gl/parse-datetime.y:731:15: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 28:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1996 || case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:731:15: | 731 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:731:15: warning: use of uninitialized value '_59->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 28:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1996 || case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:731:15: | 731 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (82) use of uninitialized value '_59->textintval' here | gl/parse-datetime.y:754:36: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 754 | { pc->local_isdst = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 29:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2005 || case 29: /* local_zone: tLOCAL_ZONE */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:754:36: 754 | { pc->local_isdst = $1; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:754:36: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 29:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2005 || case 29: /* local_zone: tLOCAL_ZONE */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:754:36: | 754 | { pc->local_isdst = $1; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:766:34: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 766 | { pc->time_zone = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 31:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2020 || case 31: /* zone: tZONE */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:766:34: 766 | { pc->time_zone = $1; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:766:34: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 31:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2020 || case 31: /* zone: tZONE */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:766:34: | 766 | { pc->time_zone = $1; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:770:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 770 | { pc->time_zone = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 33:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2032 || case 33: /* zone: tZONE relunit_snumber */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:770:35: 770 | { pc->time_zone = $1; | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:770:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:770:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 33:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2032 || case 33: /* zone: tZONE relunit_snumber */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:770:35: | 770 | { pc->time_zone = $1; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:770:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 33:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2032 || case 33: /* zone: tZONE relunit_snumber */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:770:35: | 770 | { pc->time_zone = $1; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:770:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:770:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 33:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2032 || case 33: /* zone: tZONE relunit_snumber */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:770:35: | 770 | { pc->time_zone = $1; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:771:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 771 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 33:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2032 || case 33: /* zone: tZONE relunit_snumber */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:771:15: 771 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | ^ | | | (22) use of uninitialized value 'yyvsp_221->rel' here gl/parse-datetime.y:771:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 33:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2032 || case 33: /* zone: tZONE relunit_snumber */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:771:15: | 771 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->rel' here | gl/parse-datetime.y:776:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 776 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 34:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2041 || case 34: /* zone: 'T' relunit_snumber */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:776:15: 776 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | ^ | | | (22) use of uninitialized value 'yyvsp_221->rel' here gl/parse-datetime.y:776:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 34:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2041 || case 34: /* zone: 'T' relunit_snumber */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:776:15: | 776 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->rel' here | gl/parse-datetime.y:780:15: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 35:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:780:15: 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:780:15: warning: use of uninitialized value '_72->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 35:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:780:15: | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (39) use of uninitialized value '_72->textintval' here | gl/parse-datetime.y:780:15: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 35:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:780:15: | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:780:15: warning: use of uninitialized value '_72->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 35:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:780:15: | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (82) use of uninitialized value '_72->textintval' here | gl/parse-datetime.y:781:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 781 | if (ckd_add (&pc->time_zone, pc->time_zone, $1)) YYABORT; } | ^ 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 35:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:780:15: | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (39) calling 'time_zone_hhmm' from 'yyparse' | +--> 'time_zone_hhmm': events 40-42 | | 1234 | time_zone_hhmm (parser_control *pc, textint s, intmax_t mm) | | ^ | | | | | (40) entry to 'time_zone_hhmm' |...... | 1254 | if (overflow || ! (-24 * 60 <= n_minutes && n_minutes <= 24 * 60)) | | ~ | | | | | (41) following 'false' branch... ->-+ | | | | | | | |+---------------------------------------------------+ | 1255 || return false; | 1256 || pc->time_zone = n_minutes * 60; | || ~ | || | | |+->(42) ...to here | <------+ | 'yyparse': event 43 | | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (43) returning to 'yyparse' from 'time_zone_hhmm' | 'yyparse': events 44-46 | | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (44) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 781 || if (ckd_add (&pc->time_zone, pc->time_zone, $1)) YYABORT; } | || ~ ~ | || | | | || | (46) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | |+------->(45) ...to here | gl/parse-datetime.y:781:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 781 | if (ckd_add (&pc->time_zone, pc->time_zone, $1)) YYABORT; } | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:781:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 35:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(87) ...to here | 'yyparse': event 88 | |gl/parse-datetime.y:780:15: | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (88) calling 'time_zone_hhmm' from 'yyparse' | +--> 'time_zone_hhmm': events 89-91 | | 1234 | time_zone_hhmm (parser_control *pc, textint s, intmax_t mm) | | ^ | | | | | (89) entry to 'time_zone_hhmm' |...... | 1254 | if (overflow || ! (-24 * 60 <= n_minutes && n_minutes <= 24 * 60)) | | ~ | | | | | (90) following 'false' branch... ->-+ | | | | | | | |+---------------------------------------------------+ | 1255 || return false; | 1256 || pc->time_zone = n_minutes * 60; | || ~ | || | | |+->(91) ...to here | <------+ | 'yyparse': event 92 | | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (92) returning to 'yyparse' from 'time_zone_hhmm' | 'yyparse': events 93-95 | | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (93) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 781 || if (ckd_add (&pc->time_zone, pc->time_zone, $1)) YYABORT; } | || ~ ~ | || | | | || | (95) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | |+------->(94) ...to here | gl/parse-datetime.y:781:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 781 | if (ckd_add (&pc->time_zone, pc->time_zone, $1)) YYABORT; } | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:783:34: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 783 | { pc->time_zone = $1 + 60 * 60; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 36:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2057 || case 36: /* zone: tDAYZONE */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:783:34: 783 | { pc->time_zone = $1 + 60 * 60; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:783:34: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 36:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2057 || case 36: /* zone: tDAYZONE */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:783:34: | 783 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:785:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 785 | { pc->time_zone = $1 + 60 * 60; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 37:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2063 || case 37: /* zone: tZONE tDST */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:785:35: 785 | { pc->time_zone = $1 + 60 * 60; } | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:785:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:785:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 37:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2063 || case 37: /* zone: tZONE tDST */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:785:35: | 785 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:785:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 37:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2063 || case 37: /* zone: tZONE tDST */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:785:35: | 785 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:785:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:785:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 37:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2063 || case 37: /* zone: tZONE tDST */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:785:35: | 785 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:792:35: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 792 | pc->day_number = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 38:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2069 || case 38: /* day: tDAY */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:792:35: 792 | pc->day_number = $1; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:792:35: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 38:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2069 || case 38: /* day: tDAY */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:792:35: | 792 | pc->day_number = $1; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:797:36: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 797 | pc->day_number = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 39:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2078 || case 39: /* day: tDAY ',' */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:797:36: 797 | pc->day_number = $1; | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:797:36: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:797:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 39:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2078 || case 39: /* day: tDAY ',' */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:797:36: | 797 | pc->day_number = $1; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:797:36: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 39:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2078 || case 39: /* day: tDAY ',' */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:797:36: | 797 | pc->day_number = $1; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:797:36: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:797:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 39:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2078 || case 39: /* day: tDAY ',' */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:797:36: | 797 | pc->day_number = $1; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:801:37: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 801 | pc->day_ordinal = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 40:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2087 || case 40: /* day: tORDINAL tDAY */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:801:37: 801 | pc->day_ordinal = $1; | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:801:37: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:801:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 40:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2087 || case 40: /* day: tORDINAL tDAY */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:801:37: | 801 | pc->day_ordinal = $1; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:801:37: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 40:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2087 || case 40: /* day: tORDINAL tDAY */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:801:37: | 801 | pc->day_ordinal = $1; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:801:37: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:801:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 40:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2087 || case 40: /* day: tORDINAL tDAY */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:801:37: | 801 | pc->day_ordinal = $1; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:802:35: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 802 | pc->day_number = $2; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 40:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2087 || case 40: /* day: tORDINAL tDAY */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:802:35: 802 | pc->day_number = $2; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:802:35: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 40:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2087 || case 40: /* day: tORDINAL tDAY */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:802:35: | 802 | pc->day_number = $2; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:807:49: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 807 | pc->day_ordinal = $1.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 41:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2097 || case 41: /* day: tUNUMBER tDAY */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:807:49: 807 | pc->day_ordinal = $1.value; | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:807:49: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:807:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 41:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2097 || case 41: /* day: tUNUMBER tDAY */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:807:49: | 807 | pc->day_ordinal = $1.value; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:807:49: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 41:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2097 || case 41: /* day: tUNUMBER tDAY */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:807:49: | 807 | pc->day_ordinal = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:807:49: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:807:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 41:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2097 || case 41: /* day: tUNUMBER tDAY */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:807:49: | 807 | pc->day_ordinal = $1.value; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:808:35: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 808 | pc->day_number = $2; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 41:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2097 || case 41: /* day: tUNUMBER tDAY */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:808:35: 808 | pc->day_number = $2; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:808:35: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 41:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2097 || case 41: /* day: tUNUMBER tDAY */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:808:35: | 808 | pc->day_number = $2; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:816:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 816 | pc->month = $1.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 42:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:816:43: 816 | pc->month = $1.value; | ^ | | | (22) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:816:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:816:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:816:43: | 816 | pc->month = $1.value; | | ^ | | | | | (39) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:816:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:816:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:816:43: | 816 | pc->month = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:816:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:816:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:816:43: | 816 | pc->month = $1.value; | | ^ | | | | | (82) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:816:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:817:40: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 817 | pc->day = $3.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:817:40: | 817 | pc->day = $3.value; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:817:40: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(87) ...to here | 'yyparse': event 88 | |gl/parse-datetime.y:817:40: | 817 | pc->day = $3.value; | | ^ | | | | | (88) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:826:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 826 | if (4 <= $1.digits) | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:826:40: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) out-of-bounds read from byte -208 till byte -201 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:826:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------+ |read of 'idx_t' (8 bytes)| +-------------------------+ ^ | | +-------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +-------------------------+ +-------------------------------------+ |~~~~~~~~~~~~+~~~~~~~~~~~~||~+~~||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |200 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:826:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:826:40: | 826 | if (4 <= $1.digits) | | ^ | | | | | (82) out-of-bounds read from byte -152 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:826:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------+ |read of 'idx_t' (8 bytes)| +-------------------------+ ^ | | +-------------------------+ +----------+-------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +-------------------------+ +--------------------------------------+ |~~~~~~~~~~~~+~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |144 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:836:22: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 836 | pc->year = $1; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 836 | pc->year = $1; | | ~ | | | | | (38) out-of-bounds read from byte -224 till byte -201 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:836:22: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 836 | pc->year = $1; | ^ +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+----+ +--------+-------+ |under-read of 24 bytes| |200 bytes| |size: 1120 bytes| +----------------------+ +---------+ +----------------+ gl/parse-datetime.y:836:22: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': events 82-84 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (82) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(83) ...to here |...... | 836 | pc->year = $1; | | ~ | | | | | (84) out-of-bounds read from byte -168 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:836:22: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 836 | pc->year = $1; | ^ +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+----+ +--------+-------+ |under-read of 24 bytes| |144 bytes| |size: 1120 bytes| +----------------------+ +---------+ +----------------+ gl/parse-datetime.y:837:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 837 | pc->month = $3.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 837 | pc->month = $3.value; | | | | | | | (38) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:837:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 837 | pc->month = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:837:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': events 82-84 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (82) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(83) ...to here |...... | 837 | pc->month = $3.value; | | | | | | | (84) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:837:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 837 | pc->month = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:838:44: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 838 | pc->day = $5.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 838 | pc->day = $5.value; | | | | | | | (38) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:838:44: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 838 | pc->day = $5.value; | ^ 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(87) ...to here | 'yyparse': events 88-90 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (88) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(89) ...to here |...... | 838 | pc->day = $5.value; | | | | | | | (90) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:847:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 847 | pc->month = $1.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 847 | pc->month = $1.value; | | | | | | | (38) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 847 | pc->month = $1.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:847:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': events 82-84 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (82) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(83) ...to here |...... | 847 | pc->month = $1.value; | | | | | | | (84) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 847 | pc->month = $1.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:848:45: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 848 | pc->day = $3.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 848 | pc->day = $3.value; | | | | | | | (38) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:848:45: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 848 | pc->day = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:848:45: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': events 82-84 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (82) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(83) ...to here |...... | 848 | pc->day = $3.value; | | | | | | | (84) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:848:45: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 848 | pc->day = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:849:22: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 849 | pc->year = $5; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 849 | pc->year = $5; | | ~ | | | | | (38) use of uninitialized value 'yyvsp_221->textintval' here | gl/parse-datetime.y:855:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 855 | pc->day = $1.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:855:41: | 855 | pc->day = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:855:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:855:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:855:41: | 855 | pc->day = $1.value; | | ^ | | | | | (82) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:855:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:856:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 856 | pc->month = $3.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:856:43: | 856 | pc->month = $3.value; | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:856:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:856:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:856:43: | 856 | pc->month = $3.value; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:861:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 861 | pc->day = $1.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:861:41: | 861 | pc->day = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:861:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:861:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:861:41: | 861 | pc->day = $1.value; | | ^ | | | | | (82) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:861:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:862:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 862 | pc->month = $3.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:862:43: | 862 | pc->month = $3.value; | | ^ | | | | | (36) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:862:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:862:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:862:43: | 862 | pc->month = $3.value; | | ^ | | | | | (82) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:862:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:863:18: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 863 | pc->year = $5; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:863:18: | 863 | pc->year = $5; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval' here | gl/parse-datetime.y:868:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 868 | pc->day = $1.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:868:41: | 868 | pc->day = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:868:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:868:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:868:41: | 868 | pc->day = $1.value; | | ^ | | | | | (82) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:868:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:869:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 869 | pc->month = $2; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:869:31: | 869 | pc->month = $2; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:869:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:869:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:869:31: | 869 | pc->month = $2; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:870:13: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 870 | if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:870:13: | 870 | if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:876:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 876 | pc->month = $1; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:876:31: | 876 | pc->month = $1; | | ^ | | | | | (36) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:876:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |104 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:876:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:876:31: | 876 | pc->month = $1; | | ^ | | | | | (82) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:876:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:877:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:877:13: | 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:877:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:877:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:877:13: | 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:878:13: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 878 | if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:877:12: | 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | | ^ | | | | | (36) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------------+ | 878 || if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; | || ~ ~ | || | | | || | (38) use of uninitialized value 'yyvsp_221->textintval.value' here | |+------->(37) ...to here | gl/parse-datetime.y:883:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 883 | pc->month = $1; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 48:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2198 || case 48: /* date: tMONTH tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:883:31: | 883 | pc->month = $1; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:883:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:883:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 48:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2198 || case 48: /* date: tMONTH tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:883:31: | 883 | pc->month = $1; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:884:40: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 884 | pc->day = $2.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 48:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2198 || case 48: /* date: tMONTH tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:884:40: | 884 | pc->day = $2.value; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:888:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 888 | pc->month = $1; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:888:31: | 888 | pc->month = $1; | | ^ | | | | | (36) out-of-bounds read from byte -168 till byte -161 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:888:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |160 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:888:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:888:31: | 888 | pc->month = $1; | | ^ | | | | | (82) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:888:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |104 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:889:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 889 | pc->day = $2.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:889:41: | 889 | pc->day = $2.value; | | ^ | | | | | (36) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:889:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:889:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:889:41: | 889 | pc->day = $2.value; | | ^ | | | | | (82) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:889:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:890:18: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 890 | pc->year = $4; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:890:18: | 890 | pc->year = $4; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval' here | gl/parse-datetime.y:894:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 894 | pc->day = $1.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 50:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2217 || case 50: /* date: tUNUMBER tMONTH */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:894:41: | 894 | pc->day = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:894:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:894:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 50:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2217 || case 50: /* date: tUNUMBER tMONTH */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:894:41: | 894 | pc->day = $1.value; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:895:30: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 895 | pc->month = $2; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 50:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2217 || case 50: /* date: tUNUMBER tMONTH */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:895:30: | 895 | pc->month = $2; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:899:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 899 | pc->day = $1.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:899:41: | 899 | pc->day = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:899:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:899:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:899:41: | 899 | pc->day = $1.value; | | ^ | | | | | (82) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:899:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:900:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 900 | pc->month = $2; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:900:31: | 900 | pc->month = $2; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:900:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:900:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:900:31: | 900 | pc->month = $2; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:901:18: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 901 | pc->year = $3; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:901:18: | 901 | pc->year = $3; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval' here | gl/parse-datetime.y:910:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 910 | pc->year = $1; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:910:18: | 910 | pc->year = $1; | | ^ | | | | | (36) out-of-bounds read from byte -112 till byte -89 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:910:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+---+ +--------+-------+ |under-read of 24 bytes| |88 bytes| |size: 1120 bytes| +----------------------+ +--------+ +----------------+ gl/parse-datetime.y:910:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:910:18: | 910 | pc->year = $1; | | ^ | | | | | (82) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:910:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+---+ +--------+-------+ |under-read of 24 bytes| |32 bytes| |size: 1120 bytes| +----------------------+ +--------+ +----------------+ gl/parse-datetime.y:911:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:911:13: | 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:911:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:911:13: | 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:912:13: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 912 | if (ckd_sub (&pc->day, 0, $3.value)) YYABORT; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:911:12: | 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | | ^ | | | | | (36) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------------+ | 912 || if (ckd_sub (&pc->day, 0, $3.value)) YYABORT; | || ~ ~ | || | | | || | (38) use of uninitialized value 'yyvsp_221->textintval.value' here | |+------->(37) ...to here | gl/parse-datetime.y:918:15: warning: use of uninitialized value '_136->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 918 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | ^ 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 54:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2247 || case 54: /* rel: relunit tAGO */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:918:15: | 918 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (82) use of uninitialized value '_136->rel' here | gl/parse-datetime.y:918:66: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 918 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 54:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2247 || case 54: /* rel: relunit tAGO */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:918:66: | 918 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:920:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 920 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 55:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2253 || case 55: /* rel: relunit */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:920:15: | 920 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->rel' here | gl/parse-datetime.y:922:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 922 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 56:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2259 || case 56: /* rel: dayshift */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:922:15: | 922 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->rel' here | gl/parse-datetime.y:927:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 927 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 57:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2265 || case 57: /* relunit: tORDINAL tYEAR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:927:69: | 927 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:927:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:927:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 57:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2265 || case 57: /* relunit: tORDINAL tYEAR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:927:69: | 927 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:929:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 929 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 58:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2271 || case 58: /* relunit: tUNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:929:81: | 929 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:929:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:929:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 58:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2271 || case 58: /* relunit: tUNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:929:81: | 929 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:933:70: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 933 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 60:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2283 || case 60: /* relunit: tORDINAL tMONTH_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:933:70: | 933 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:933:70: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:933:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 60:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2283 || case 60: /* relunit: tORDINAL tMONTH_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:933:70: | 933 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:935:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 935 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 61:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2289 || case 61: /* relunit: tUNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:935:82: | 935 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:935:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:935:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 61:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2289 || case 61: /* relunit: tUNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:935:82: | 935 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:940:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 63:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2301 || case 63: /* relunit: tORDINAL tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:940:13: | 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:940:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:940:13: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 63:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2301 || case 63: /* relunit: tORDINAL tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:940:13: | 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:940:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 63:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2301 || case 63: /* relunit: tORDINAL tDAY_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:940:13: | 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:943:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 64:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2308 || case 64: /* relunit: tUNUMBER tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:943:13: | 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:943:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:943:13: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 64:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2308 || case 64: /* relunit: tUNUMBER tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:943:13: | 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:943:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 64:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2308 || case 64: /* relunit: tUNUMBER tDAY_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:943:13: | 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:945:67: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 945 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 65:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2315 || case 65: /* relunit: tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:945:67: | 945 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:947:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 947 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 66:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2321 || case 66: /* relunit: tORDINAL tHOUR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:947:69: | 947 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:947:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:947:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 66:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2321 || case 66: /* relunit: tORDINAL tHOUR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:947:69: | 947 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:949:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 949 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 67:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2327 || case 67: /* relunit: tUNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:949:81: | 949 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:949:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:949:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 67:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2327 || case 67: /* relunit: tUNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:949:81: | 949 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:953:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 69:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2339 || case 69: /* relunit: tORDINAL tMINUTE_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:953:72: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:953:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:953:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 69:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2339 || case 69: /* relunit: tORDINAL tMINUTE_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:953:72: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:955:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 955 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 70:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2345 || case 70: /* relunit: tUNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:955:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 70:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2345 || case 70: /* relunit: tUNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:959:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 959 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 72:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2357 || case 72: /* relunit: tORDINAL tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:959:72: | 959 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:959:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:959:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 72:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2357 || case 72: /* relunit: tORDINAL tSEC_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:959:72: | 959 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:961:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 961 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 73:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2363 || case 73: /* relunit: tUNUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:961:84: | 961 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:961:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:961:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 73:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2363 || case 73: /* relunit: tUNUMBER tSEC_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:961:84: | 961 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:963:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 74:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2369 || case 74: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:963:82: | 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:963:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:963:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 74:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2369 || case 74: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:963:82: | 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:963:128: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 74:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2369 || case 74: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:963:128: | 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:963:128: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:965:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 75:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2375 || case 75: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:965:82: | 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:965:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:965:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 75:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2375 || case 75: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:965:82: | 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:965:128: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 75:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2375 || case 75: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:965:128: | 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:965:128: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:973:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 973 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 78:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2387 || case 78: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:973:81: | 973 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:973:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:973:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 78:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2387 || case 78: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:973:81: | 973 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:975:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 975 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 79:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2393 || case 79: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:975:82: | 975 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:975:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:975:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 79:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2393 || case 79: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:975:82: | 975 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:978:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 80:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2399 || case 80: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:978:13: | 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:978:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:978:13: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 80:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2399 || case 80: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:978:13: | 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:978:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 80:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2399 || case 80: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:978:13: | 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:980:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 980 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 81:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2406 || case 81: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:980:81: | 980 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:980:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:980:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 81:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2406 || case 81: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:980:81: | 980 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:982:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 982 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 82:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2412 || case 82: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:982:84: | 982 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:982:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:982:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 82:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2412 || case 82: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:982:84: | 982 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:984:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 984 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 83:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2418 || case 83: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:984:84: | 984 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:984:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:984:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 83:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2418 || case 83: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:984:84: | 984 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:989:67: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 989 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 84:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2424 || case 84: /* dayshift: tDAY_SHIFT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:989:67: | 989 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:998:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 998 | $$ = (struct timespec) { .tv_sec = $1.value }; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 88:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2430 || case 88: /* signed_seconds: tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:998:79: | 998 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:998:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 88:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2430 || case 88: /* signed_seconds: tSNUMBER */ | || ~ | || | | |+->(87) ...to here | 'yyparse': event 88 | |gl/parse-datetime.y:998:79: | 998 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (88) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1005:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1005 | $$ = (struct timespec) { .tv_sec = $1.value }; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 90:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2437 || case 90: /* unsigned_seconds: tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:1005:79: | 1005 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1005:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 90:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2437 || case 90: /* unsigned_seconds: tUNUMBER */ | || ~ | || | | |+->(87) ...to here | 'yyparse': event 88 | |gl/parse-datetime.y:1005:79: | 1005 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (88) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1010:9: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1010 | { digits_to_date_time (pc, $1); } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 91:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2444 || case 91: /* number: tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:1010:9: | 1010 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval' here | gl/parse-datetime.y:1018:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 1018 | digits_to_date_time (pc, $1); | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 92:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2450 || case 92: /* hybrid: tUNUMBER relunit_snumber */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:1018:9: | 1018 | digits_to_date_time (pc, $1); | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:1018:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+---+ +--------+-------+ |under-read of 24 bytes| |32 bytes| |size: 1120 bytes| +----------------------+ +--------+ +----------------+ gl/parse-datetime.y:1018:9: warning: use of uninitialized value '_180->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 92:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2450 || case 92: /* hybrid: tUNUMBER relunit_snumber */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:1018:9: | 1018 | digits_to_date_time (pc, $1); | | ^ | | | | | (82) use of uninitialized value '_180->textintval' here | gl/parse-datetime.y:1027:47: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1027 | { $$ = $2.value; } | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 94:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2467 || case 94: /* o_colon_minutes: ':' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:1027:47: | 1027 | { $$ = $2.value; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1027:47: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 94:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2467 || case 94: /* o_colon_minutes: ':' tUNUMBER */ | || ~ | || | | |+->(87) ...to here | 'yyparse': event 88 | |gl/parse-datetime.y:1027:47: | 1027 | { $$ = $2.value; } | | ^ | | | | | (88) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.c:2601:12: warning: use of uninitialized value 'yylval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 2601 | *++yyvsp = yylval; | ^ 'yyparse': events 1-4 | | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1601 | YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); | | ~ | | | | | (2) region created on stack here | | (3) capacity: 56 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | | 'yyparse': events 5-12 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(5) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (6) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(7) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (8) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (10) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(9) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(11) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (12) calling 'yylex' from 'yyparse' | +--> 'yylex': events 13-14 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (13) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (14) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 15-16 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (15) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(16) ...to here | <-------------+ | 'yyparse': events 17-20 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (17) returning to 'yyparse' from 'yylex' |...... | 1819 | if (yyn == 0) | | ~ | | | | | (18) following 'true' branch (when 'yyn_250 == 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1820 || goto yyerrlab; | || ~ | || | | |+--->(19) ...to here |...... | 2518 | if (!yyerrstatus) | | ~ | | | | | (20) following 'true' branch (when 'yyerrstatus_214 == 0')... ->-+ | | | | 'yyparse': events 21-28 | | | | | |+----------------------------------------------------------------------+ | 2518 || if (!yyerrstatus) | || ^ | || | | |+---->(21) ...to here |...... | 2577 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (22) following 'true' branch (when 'yyn_397 != -93')... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 2578 || { | 2579 || yyn += YYSYMBOL_YYerror; | || ~ | || | | |+--------->(23) ...to here | 2580 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+------------------------------------------------+ | 2581 || { | 2582 || yyn = yytable[yyn]; | || ~ | || | | |+------------->(25) ...to here | 2583 | if (0 < yyn) | | ~ | | | | | (26) following 'true' branch (when 'yyn_399 > 0')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 2601 || *++yyvsp = yylval; | || ~ ~ | || | | | || | (28) use of uninitialized value 'yylval' here | |+->(27) ...to here | gl/parse-datetime.c:2601:12: warning: use of uninitialized value 'yylval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 2601 | *++yyvsp = yylval; | ^ 'parse_datetime_body': events 1-6 | |gl/parse-datetime.y:1767:1: | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-17 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1601 | YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); | | ~ | | | | | (15) region created on stack here | | (16) capacity: 56 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (17) following 'false' branch... ->-+ | | | | 'yyparse': events 18-25 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(18) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (19) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(20) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (21) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (23) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(22) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(24) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (25) calling 'yylex' from 'yyparse' | +--> 'yylex': events 26-27 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (26) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (27) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 28-29 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (28) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(29) ...to here | <-------------+ | 'yyparse': events 30-33 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (30) returning to 'yyparse' from 'yylex' |...... | 1819 | if (yyn == 0) | | ~ | | | | | (31) following 'true' branch (when 'yyn_250 == 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1820 || goto yyerrlab; | || ~ | || | | |+--->(32) ...to here |...... | 2518 | if (!yyerrstatus) | | ~ | | | | | (33) following 'true' branch (when 'yyerrstatus_214 == 0')... ->-+ | | | | 'yyparse': events 34-41 | | | | | |+----------------------------------------------------------------------+ | 2518 || if (!yyerrstatus) | || ^ | || | | |+---->(34) ...to here |...... | 2577 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (35) following 'true' branch (when 'yyn_397 != -93')... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 2578 || { | 2579 || yyn += YYSYMBOL_YYerror; | || ~ | || | | |+--------->(36) ...to here | 2580 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (37) following 'true' branch... ->-+ | | | | | | | |+------------------------------------------------+ | 2581 || { | 2582 || yyn = yytable[yyn]; | || ~ | || | | |+------------->(38) ...to here | 2583 | if (0 < yyn) | | ~ | | | | | (39) following 'true' branch (when 'yyn_399 > 0')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 2601 || *++yyvsp = yylval; | || ~ ~ | || | | | || | (41) use of uninitialized value 'yylval' here | |+->(40) ...to here | gl/parse-datetime.y: In function 'digits_to_date_time': gl/parse-datetime.y:273:1: warning: use of uninitialized value 'text_int.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 273 | digits_to_date_time (parser_control *pc, textint text_int) | ^ 'yyparse': events 1-2 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | | 'yyparse': events 3-10 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(3) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(5) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(7) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(9) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (10) calling 'yylex' from 'yyparse' | +--> 'yylex': events 11-12 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (11) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (12) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 13-16 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (13) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (14) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (16) following 'true' branch (when the strings are equal)... ->-+ | |+--->(15) ...to here | | | | | 'lookup_word': event 17 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(17) ...to here | <------+ | 'yylex': events 18-20 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (18) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (19) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(20) ...to here | <------+ | 'yyparse': events 21-26 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (21) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (22) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(23) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(25) ...to here | | | | | 'yyparse': events 27-28 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (28) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(27) ...to here | 'yyparse': events 29-37 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(29) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (30) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(31) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (32) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(33) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (34) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(35) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (36) following 'case 91:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2444 || case 91: /* number: tUNUMBER */ | || ~ | || | | |+->(37) ...to here | 'yyparse': event 38 | |gl/parse-datetime.y:1010:9: | 1010 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (38) calling 'digits_to_date_time' from 'yyparse' | +--> 'digits_to_date_time': events 39-41 | | 273 | digits_to_date_time (parser_control *pc, textint text_int) | | ^ ~ | | | | | | (39) entry to 'digits_to_date_time' (40) region created on stack here | | (41) use of uninitialized value 'text_int.value' here | gl/parse-datetime.y:273:1: warning: use of uninitialized value 'text_int.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-51 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (51) following 'false' branch... ->-+ | | | | 'yyparse': events 52-59 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(52) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (53) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(54) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (55) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (57) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(56) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(58) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (59) calling 'yylex' from 'yyparse' | +--> 'yylex': events 60-61 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (60) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (61) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 62-65 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (62) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (63) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (65) following 'true' branch (when the strings are equal)... ->-+ | |+--->(64) ...to here | | | | | 'lookup_word': event 66 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(66) ...to here | <------+ | 'yylex': events 67-69 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (67) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (68) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(69) ...to here | <------+ | 'yyparse': events 70-75 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (70) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (71) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(72) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (73) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (75) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(74) ...to here | | | | | 'yyparse': events 76-77 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (77) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(76) ...to here | 'yyparse': events 78-86 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(78) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (79) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(80) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (81) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(82) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(84) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (85) following 'case 91:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2444 || case 91: /* number: tUNUMBER */ | || ~ | || | | |+->(86) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:1010:9: | 1010 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (87) calling 'digits_to_date_time' from 'yyparse' | +--> 'digits_to_date_time': events 88-90 | | 273 | digits_to_date_time (parser_control *pc, textint text_int) | | ^ ~ | | | | | | (88) entry to 'digits_to_date_time' (89) region created on stack here | | (90) use of uninitialized value 'text_int.value' here | gl/parse-datetime.y: In function 'apply_relative_time': gl/parse-datetime.y:313:1: warning: use of uninitialized value 'rel.month' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 313 | apply_relative_time (parser_control *pc, relative_time rel, int factor) | ^ 'yyparse': events 1-2 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | | 'yyparse': events 3-10 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(3) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(5) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(7) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(9) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (10) calling 'yylex' from 'yyparse' | +--> 'yylex': events 11-12 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (11) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (12) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 13-16 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (13) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (14) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (16) following 'true' branch (when the strings are equal)... ->-+ | |+--->(15) ...to here | | | | | 'lookup_word': event 17 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(17) ...to here | <------+ | 'yylex': events 18-20 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (18) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (19) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(20) ...to here | <------+ | 'yyparse': events 21-26 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (21) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (22) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(23) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(25) ...to here | | | | | 'yyparse': events 27-28 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (28) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(27) ...to here | 'yyparse': events 29-37 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(29) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (30) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(31) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (32) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(33) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (34) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(35) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (36) following 'case 55:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2253 || case 55: /* rel: relunit */ | || ~ | || | | |+->(37) ...to here | 'yyparse': event 38 | |gl/parse-datetime.y:920:15: | 920 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (38) calling 'apply_relative_time' from 'yyparse' | +--> 'apply_relative_time': events 39-41 | | 313 | apply_relative_time (parser_control *pc, relative_time rel, int factor) | | ^ ~ | | | | | | (39) entry to 'apply_relative_time' (40) region created on stack here | | (41) use of uninitialized value 'rel.month' here | gl/parse-datetime.y:313:1: warning: use of uninitialized value 'rel.month' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-51 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (51) following 'false' branch... ->-+ | | | | 'yyparse': events 52-59 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(52) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (53) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(54) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (55) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (57) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(56) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(58) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (59) calling 'yylex' from 'yyparse' | +--> 'yylex': events 60-61 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (60) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (61) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 62-65 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (62) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (63) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (65) following 'true' branch (when the strings are equal)... ->-+ | |+--->(64) ...to here | | | | | 'lookup_word': event 66 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(66) ...to here | <------+ | 'yylex': events 67-69 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (67) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (68) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(69) ...to here | <------+ | 'yyparse': events 70-75 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (70) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (71) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(72) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (73) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (75) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(74) ...to here | | | | | 'yyparse': events 76-77 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (77) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(76) ...to here | 'yyparse': events 78-86 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(78) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (79) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(80) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (81) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(82) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(84) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (85) following 'case 55:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2253 || case 55: /* rel: relunit */ | || ~ | || | | |+->(86) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:920:15: | 920 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (87) calling 'apply_relative_time' from 'yyparse' | +--> 'apply_relative_time': events 88-90 | | 313 | apply_relative_time (parser_control *pc, relative_time rel, int factor) | | ^ ~ | | | | | | (88) entry to 'apply_relative_time' (89) region created on stack here | | (90) use of uninitialized value 'rel.month' here | gl/parse-datetime.c: In function 'yyparse': gl/parse-datetime.c:1806:12: warning: use of uninitialized value 'yylval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1806 | *++yyvsp = yylval; | ^ 'yyparse': events 1-4 | | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1601 | YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); | | ~ | | | | | (2) region created on stack here | | (3) capacity: 56 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | | 'yyparse': events 5-12 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(5) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (6) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(7) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (8) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (10) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(9) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(11) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (12) calling 'yylex' from 'yyparse' | +--> 'yylex': events 13-14 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (13) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (14) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 15-16 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (15) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(16) ...to here | <-------------+ | 'yyparse': events 17-22 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (17) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (18) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(19) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (20) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (22) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(21) ...to here | | | | | 'yyparse': events 23-24 | | | | | |+-----------------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(23) ...to here |...... | 1806 | *++yyvsp = yylval; | | ~ | | | | | (24) use of uninitialized value 'yylval' here | gl/parse-datetime.c:1806:12: warning: use of uninitialized value 'yylval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1806 | *++yyvsp = yylval; | ^ 'parse_datetime_body': events 1-6 | |gl/parse-datetime.y:1767:1: | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-17 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1601 | YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); | | ~ | | | | | (15) region created on stack here | | (16) capacity: 56 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (17) following 'false' branch... ->-+ | | | | 'yyparse': events 18-25 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(18) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (19) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(20) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (21) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (23) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(22) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(24) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (25) calling 'yylex' from 'yyparse' | +--> 'yylex': events 26-27 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (26) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (27) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 28-29 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (28) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(29) ...to here | <-------------+ | 'yyparse': events 30-35 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (30) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (31) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(32) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (33) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (35) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(34) ...to here | | | | | 'yyparse': events 36-37 | | | | | |+-----------------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(36) ...to here |...... | 1806 | *++yyvsp = yylval; | | ~ | | | | | (37) use of uninitialized value 'yylval' here | gl/parse-datetime.c:1839:9: warning: use of uninitialized value '*_14' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1839 | yyval = yyvsp[1-yylen]; | ^ 'yyparse': events 1-2 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-8 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1819 | if (yyn == 0) | ~ | | | (6) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1820 || goto yyerrlab; 1821 || goto yyreduce; || ~ || | |+->(7) ...to here ...... 1839 | yyval = yyvsp[1-yylen]; | ~ | | | (8) use of uninitialized value '*_14' here gl/parse-datetime.c:1839:9: warning: use of uninitialized value '*_14' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1839 | yyval = yyvsp[1-yylen]; | ^ 'yyparse': events 1-3 | | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (13) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 14-15 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (14) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(15) ...to here | <-------------+ | 'yyparse': events 16-21 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (16) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (17) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(18) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (19) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(20) ...to here |...... | 1839 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (21) use of uninitialized value '*_14' here | gl/parse-datetime.c:1839:9: warning: use of uninitialized value '*_14' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1839 | yyval = yyvsp[1-yylen]; | ^ 'parse_datetime_body': events 1-6 | |gl/parse-datetime.y:1767:1: | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-22 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (20) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(21) ...to here |...... | 1839 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (22) use of uninitialized value '*_14' here | gl/parse-datetime.c:1839:9: warning: use of uninitialized value '*_14' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1839 | yyval = yyvsp[1-yylen]; | ^ 'parse_datetime_body': events 1-6 | |gl/parse-datetime.y:1767:1: | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-24 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (24) calling 'yylex' from 'yyparse' | +--> 'yylex': events 25-26 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (25) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (26) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 27-28 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (27) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(28) ...to here | <-------------+ | 'yyparse': events 29-34 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (29) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1839 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (34) use of uninitialized value '*_14' here | gl/parse-datetime.c:1839:9: warning: use of uninitialized value '*_14' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1839 | yyval = yyvsp[1-yylen]; | ^ 'parse_datetime': events 1-2 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(69) ...to here |...... | 1839 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (70) use of uninitialized value '*_14' here | gl/parse-datetime.y:616:21: warning: use of uninitialized value 'yyvsp_221->timespec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 616 | pc->seconds = $2; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 4:' branch... ->-+ | | | | |+----------------------------------------+ 1844 || { 1845 || case 4: /* timespec: '@' seconds */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:616:21: 616 | pc->seconds = $2; | ^ | | | (22) use of uninitialized value 'yyvsp_221->timespec' here gl/parse-datetime.y:616:21: warning: use of uninitialized value 'yyvsp_221->timespec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 4:' branch... ->-+ | | | | | | | |+----------------------------------------+ | 1844 || { | 1845 || case 4: /* timespec: '@' seconds */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:616:21: | 616 | pc->seconds = $2; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->timespec' here | gl/parse-datetime.y:688:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 688 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 19:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1942 || case 19: /* time: tUNUMBER tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:688:9: 688 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:688:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:688:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 19:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1942 || case 19: /* time: tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:688:9: | 688 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:688:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 19:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1942 || case 19: /* time: tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:688:9: | 688 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:688:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:688:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 19:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1942 || case 19: /* time: tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:688:9: | 688 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:689:33: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 689 | pc->meridian = $2; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 19:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1942 || case 19: /* time: tUNUMBER tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:689:33: 689 | pc->meridian = $2; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:689:33: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 19:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1942 || case 19: /* time: tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:689:33: | 689 | pc->meridian = $2; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:693:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 20:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:693:9: 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ | | | (22) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:693:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:693:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 20:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:693:9: 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:693:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:693:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (39) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:693:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:693:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:693:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:693:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:693:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:693:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:693:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (82) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:693:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:693:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:694:33: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 694 | pc->meridian = $4; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 20:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:694:33: 694 | pc->meridian = $4; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:694:33: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:694:33: | 694 | pc->meridian = $4; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 21:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:698:9: 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |264 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 21:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:698:9: 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (39) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (39) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |264 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:698:105: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 21:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:698:105: 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:698:105: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:698:105: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:698:105: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:698:105: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:698:105: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:105: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:698:105: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:698:105: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:698:134: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 21:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:698:134: 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:698:134: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:698:134: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:698:134: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:134: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:699:33: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 699 | pc->meridian = $6; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 21:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:699:33: 699 | pc->meridian = $6; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:699:33: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:699:33: | 699 | pc->meridian = $6; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:707:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 707 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 23:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1969 || case 23: /* iso_8601_time: tUNUMBER zone_offset */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:707:9: 707 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:707:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:707:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 23:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1969 || case 23: /* iso_8601_time: tUNUMBER zone_offset */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:707:9: | 707 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:707:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 23:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1969 || case 23: /* iso_8601_time: tUNUMBER zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:707:9: | 707 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:707:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:707:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 23:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1969 || case 23: /* iso_8601_time: tUNUMBER zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:707:9: | 707 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:712:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 24:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:712:9: 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ | | | (22) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:712:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:712:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 24:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:712:9: 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:712:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:712:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (39) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:712:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:712:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:712:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:712:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:712:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:712:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:712:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (82) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:712:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:712:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 25:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:717:9: 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |264 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 25:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:717:9: 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (39) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (39) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |264 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:717:105: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 25:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:717:105: 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:717:105: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:717:105: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:717:105: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:717:105: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:717:105: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:105: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:717:105: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:717:105: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:717:134: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 25:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:717:134: 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:717:134: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:717:134: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:717:134: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:134: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:731:15: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 731 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 28:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1996 || case 28: /* zone_offset: tSNUMBER o_colon_minutes */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:731:15: 731 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:731:15: warning: use of uninitialized value '_59->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 28:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1996 || case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:731:15: | 731 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (39) use of uninitialized value '_59->textintval' here | gl/parse-datetime.y:731:15: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 28:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1996 || case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:731:15: | 731 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:731:15: warning: use of uninitialized value '_59->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 28:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1996 || case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:731:15: | 731 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (82) use of uninitialized value '_59->textintval' here | gl/parse-datetime.y:754:36: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 754 | { pc->local_isdst = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 29:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2005 || case 29: /* local_zone: tLOCAL_ZONE */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:754:36: 754 | { pc->local_isdst = $1; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:754:36: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 29:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2005 || case 29: /* local_zone: tLOCAL_ZONE */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:754:36: | 754 | { pc->local_isdst = $1; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:766:34: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 766 | { pc->time_zone = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 31:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2020 || case 31: /* zone: tZONE */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:766:34: 766 | { pc->time_zone = $1; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:766:34: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 31:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2020 || case 31: /* zone: tZONE */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:766:34: | 766 | { pc->time_zone = $1; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:770:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 770 | { pc->time_zone = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 33:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2032 || case 33: /* zone: tZONE relunit_snumber */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:770:35: 770 | { pc->time_zone = $1; | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:770:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:770:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 33:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2032 || case 33: /* zone: tZONE relunit_snumber */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:770:35: | 770 | { pc->time_zone = $1; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:770:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 33:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2032 || case 33: /* zone: tZONE relunit_snumber */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:770:35: | 770 | { pc->time_zone = $1; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:770:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:770:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 33:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2032 || case 33: /* zone: tZONE relunit_snumber */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:770:35: | 770 | { pc->time_zone = $1; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:771:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 771 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 33:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2032 || case 33: /* zone: tZONE relunit_snumber */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:771:15: 771 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | ^ | | | (22) use of uninitialized value 'yyvsp_221->rel' here gl/parse-datetime.y:771:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 33:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2032 || case 33: /* zone: tZONE relunit_snumber */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:771:15: | 771 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->rel' here | gl/parse-datetime.y:776:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 776 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 34:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2041 || case 34: /* zone: 'T' relunit_snumber */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:776:15: 776 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | ^ | | | (22) use of uninitialized value 'yyvsp_221->rel' here gl/parse-datetime.y:776:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 34:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2041 || case 34: /* zone: 'T' relunit_snumber */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:776:15: | 776 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->rel' here | gl/parse-datetime.y:780:15: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 35:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:780:15: 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:780:15: warning: use of uninitialized value '_72->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 35:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:780:15: | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (39) use of uninitialized value '_72->textintval' here | gl/parse-datetime.y:780:15: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 35:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:780:15: | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:780:15: warning: use of uninitialized value '_72->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 35:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:780:15: | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (82) use of uninitialized value '_72->textintval' here | gl/parse-datetime.y:781:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 781 | if (ckd_add (&pc->time_zone, pc->time_zone, $1)) YYABORT; } | ^ 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 35:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:780:15: | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (39) calling 'time_zone_hhmm' from 'yyparse' | +--> 'time_zone_hhmm': events 40-42 | | 1234 | time_zone_hhmm (parser_control *pc, textint s, intmax_t mm) | | ^ | | | | | (40) entry to 'time_zone_hhmm' |...... | 1254 | if (overflow || ! (-24 * 60 <= n_minutes && n_minutes <= 24 * 60)) | | ~ | | | | | (41) following 'false' branch... ->-+ | | | | | | | |+---------------------------------------------------+ | 1255 || return false; | 1256 || pc->time_zone = n_minutes * 60; | || ~ | || | | |+->(42) ...to here | <------+ | 'yyparse': event 43 | | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (43) returning to 'yyparse' from 'time_zone_hhmm' | 'yyparse': events 44-46 | | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (44) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 781 || if (ckd_add (&pc->time_zone, pc->time_zone, $1)) YYABORT; } | || ~ ~ | || | | | || | (46) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | |+------->(45) ...to here | gl/parse-datetime.y:781:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 781 | if (ckd_add (&pc->time_zone, pc->time_zone, $1)) YYABORT; } | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:781:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 35:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(87) ...to here | 'yyparse': event 88 | |gl/parse-datetime.y:780:15: | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (88) calling 'time_zone_hhmm' from 'yyparse' | +--> 'time_zone_hhmm': events 89-91 | | 1234 | time_zone_hhmm (parser_control *pc, textint s, intmax_t mm) | | ^ | | | | | (89) entry to 'time_zone_hhmm' |...... | 1254 | if (overflow || ! (-24 * 60 <= n_minutes && n_minutes <= 24 * 60)) | | ~ | | | | | (90) following 'false' branch... ->-+ | | | | | | | |+---------------------------------------------------+ | 1255 || return false; | 1256 || pc->time_zone = n_minutes * 60; | || ~ | || | | |+->(91) ...to here | <------+ | 'yyparse': event 92 | | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (92) returning to 'yyparse' from 'time_zone_hhmm' | 'yyparse': events 93-95 | | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (93) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 781 || if (ckd_add (&pc->time_zone, pc->time_zone, $1)) YYABORT; } | || ~ ~ | || | | | || | (95) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | |+------->(94) ...to here | gl/parse-datetime.y:781:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 781 | if (ckd_add (&pc->time_zone, pc->time_zone, $1)) YYABORT; } | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:783:34: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 783 | { pc->time_zone = $1 + 60 * 60; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 36:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2057 || case 36: /* zone: tDAYZONE */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:783:34: 783 | { pc->time_zone = $1 + 60 * 60; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:783:34: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 36:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2057 || case 36: /* zone: tDAYZONE */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:783:34: | 783 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:785:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 785 | { pc->time_zone = $1 + 60 * 60; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 37:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2063 || case 37: /* zone: tZONE tDST */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:785:35: 785 | { pc->time_zone = $1 + 60 * 60; } | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:785:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:785:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 37:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2063 || case 37: /* zone: tZONE tDST */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:785:35: | 785 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:785:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 37:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2063 || case 37: /* zone: tZONE tDST */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:785:35: | 785 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:785:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:785:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 37:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2063 || case 37: /* zone: tZONE tDST */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:785:35: | 785 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:792:35: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 792 | pc->day_number = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 38:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2069 || case 38: /* day: tDAY */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:792:35: 792 | pc->day_number = $1; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:792:35: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 38:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2069 || case 38: /* day: tDAY */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:792:35: | 792 | pc->day_number = $1; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:797:36: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 797 | pc->day_number = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 39:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2078 || case 39: /* day: tDAY ',' */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:797:36: 797 | pc->day_number = $1; | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:797:36: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:797:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 39:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2078 || case 39: /* day: tDAY ',' */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:797:36: | 797 | pc->day_number = $1; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:797:36: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 39:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2078 || case 39: /* day: tDAY ',' */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:797:36: | 797 | pc->day_number = $1; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:797:36: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:797:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 39:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2078 || case 39: /* day: tDAY ',' */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:797:36: | 797 | pc->day_number = $1; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:801:37: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 801 | pc->day_ordinal = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 40:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2087 || case 40: /* day: tORDINAL tDAY */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:801:37: 801 | pc->day_ordinal = $1; | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:801:37: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:801:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 40:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2087 || case 40: /* day: tORDINAL tDAY */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:801:37: | 801 | pc->day_ordinal = $1; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:801:37: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 40:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2087 || case 40: /* day: tORDINAL tDAY */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:801:37: | 801 | pc->day_ordinal = $1; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:801:37: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:801:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 40:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2087 || case 40: /* day: tORDINAL tDAY */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:801:37: | 801 | pc->day_ordinal = $1; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:802:35: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 802 | pc->day_number = $2; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 40:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2087 || case 40: /* day: tORDINAL tDAY */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:802:35: 802 | pc->day_number = $2; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:802:35: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 40:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2087 || case 40: /* day: tORDINAL tDAY */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:802:35: | 802 | pc->day_number = $2; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:807:49: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 807 | pc->day_ordinal = $1.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 41:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2097 || case 41: /* day: tUNUMBER tDAY */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:807:49: 807 | pc->day_ordinal = $1.value; | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:807:49: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:807:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 41:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2097 || case 41: /* day: tUNUMBER tDAY */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:807:49: | 807 | pc->day_ordinal = $1.value; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:807:49: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 41:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2097 || case 41: /* day: tUNUMBER tDAY */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:807:49: | 807 | pc->day_ordinal = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:807:49: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:807:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 41:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2097 || case 41: /* day: tUNUMBER tDAY */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:807:49: | 807 | pc->day_ordinal = $1.value; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:808:35: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 808 | pc->day_number = $2; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 41:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2097 || case 41: /* day: tUNUMBER tDAY */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:808:35: 808 | pc->day_number = $2; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:808:35: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 41:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2097 || case 41: /* day: tUNUMBER tDAY */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:808:35: | 808 | pc->day_number = $2; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:816:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 816 | pc->month = $1.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 42:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:816:43: 816 | pc->month = $1.value; | ^ | | | (22) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:816:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:816:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:816:43: | 816 | pc->month = $1.value; | | ^ | | | | | (39) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:816:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:816:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:816:43: | 816 | pc->month = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:816:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:816:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:816:43: | 816 | pc->month = $1.value; | | ^ | | | | | (82) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:816:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:817:40: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 817 | pc->day = $3.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 42:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:817:40: 817 | pc->day = $3.value; | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval.value' here gl/parse-datetime.y:817:40: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:817:40: | 817 | pc->day = $3.value; | | ^ | | | | | (39) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:817:40: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:817:40: | 817 | pc->day = $3.value; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:817:40: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(87) ...to here | 'yyparse': event 88 | |gl/parse-datetime.y:817:40: | 817 | pc->day = $3.value; | | ^ | | | | | (88) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:826:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 826 | if (4 <= $1.digits) | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 43:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:826:40: 826 | if (4 <= $1.digits) | ^ | | | (22) out-of-bounds read from byte -208 till byte -201 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:826:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------+ |read of 'idx_t' (8 bytes)| +-------------------------+ ^ | | +-------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +-------------------------+ +-------------------------------------+ |~~~~~~~~~~~~+~~~~~~~~~~~~||~+~~||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |200 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:826:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:826:40: | 826 | if (4 <= $1.digits) | | ^ | | | | | (39) out-of-bounds read from byte -152 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:826:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------+ |read of 'idx_t' (8 bytes)| +-------------------------+ ^ | | +-------------------------+ +----------+-------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +-------------------------+ +--------------------------------------+ |~~~~~~~~~~~~+~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |144 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:826:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:826:40: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) out-of-bounds read from byte -208 till byte -201 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:826:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------+ |read of 'idx_t' (8 bytes)| +-------------------------+ ^ | | +-------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +-------------------------+ +-------------------------------------+ |~~~~~~~~~~~~+~~~~~~~~~~~~||~+~~||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |200 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:826:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:826:40: | 826 | if (4 <= $1.digits) | | ^ | | | | | (82) out-of-bounds read from byte -152 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:826:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------+ |read of 'idx_t' (8 bytes)| +-------------------------+ ^ | | +-------------------------+ +----------+-------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +-------------------------+ +--------------------------------------+ |~~~~~~~~~~~~+~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |144 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:836:22: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 836 | pc->year = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 43:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': events 22-24 gl/parse-datetime.y:826:12: 826 | if (4 <= $1.digits) | ^ | | | (22) following 'true' branch... ->-+ | | | | |+----------------------------------------------+ 827 || { 828 || if (debugging (pc)) || ~ || | |+----------->(23) ...to here ...... 836 | pc->year = $1; | ~ | | | (24) out-of-bounds read from byte -224 till byte -201 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:836:22: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 836 | pc->year = $1; | ^ +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+----+ +--------+-------+ |under-read of 24 bytes| |200 bytes| |size: 1120 bytes| +----------------------+ +---------+ +----------------+ gl/parse-datetime.y:836:22: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': events 39-41 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (39) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(40) ...to here |...... | 836 | pc->year = $1; | | ~ | | | | | (41) out-of-bounds read from byte -168 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:836:22: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 836 | pc->year = $1; | ^ +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+----+ +--------+-------+ |under-read of 24 bytes| |144 bytes| |size: 1120 bytes| +----------------------+ +---------+ +----------------+ gl/parse-datetime.y:836:22: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 836 | pc->year = $1; | | ~ | | | | | (38) out-of-bounds read from byte -224 till byte -201 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:836:22: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 836 | pc->year = $1; | ^ +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+----+ +--------+-------+ |under-read of 24 bytes| |200 bytes| |size: 1120 bytes| +----------------------+ +---------+ +----------------+ gl/parse-datetime.y:836:22: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': events 82-84 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (82) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(83) ...to here |...... | 836 | pc->year = $1; | | ~ | | | | | (84) out-of-bounds read from byte -168 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:836:22: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 836 | pc->year = $1; | ^ +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+----+ +--------+-------+ |under-read of 24 bytes| |144 bytes| |size: 1120 bytes| +----------------------+ +---------+ +----------------+ gl/parse-datetime.y:837:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 837 | pc->month = $3.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 43:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': events 22-24 gl/parse-datetime.y:826:12: 826 | if (4 <= $1.digits) | ^ | | | (22) following 'true' branch... ->-+ | | | | |+----------------------------------------------+ 827 || { 828 || if (debugging (pc)) || ~ || | |+----------->(23) ...to here ...... 837 | pc->month = $3.value; | | | | (24) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:837:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 837 | pc->month = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:837:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': events 39-41 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (39) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(40) ...to here |...... | 837 | pc->month = $3.value; | | | | | | | (41) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:837:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 837 | pc->month = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:837:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 837 | pc->month = $3.value; | | | | | | | (38) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:837:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 837 | pc->month = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:837:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': events 82-84 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (82) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(83) ...to here |...... | 837 | pc->month = $3.value; | | | | | | | (84) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:837:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 837 | pc->month = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:838:44: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 838 | pc->day = $5.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 43:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': events 22-24 gl/parse-datetime.y:826:12: 826 | if (4 <= $1.digits) | ^ | | | (22) following 'true' branch... ->-+ | | | | |+----------------------------------------------+ 827 || { 828 || if (debugging (pc)) || ~ || | |+----------->(23) ...to here ...... 838 | pc->day = $5.value; | | | | (24) use of uninitialized value 'yyvsp_221->textintval.value' here gl/parse-datetime.y:838:44: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 838 | pc->day = $5.value; | ^ 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': events 39-41 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (39) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(40) ...to here |...... | 838 | pc->day = $5.value; | | | | | | | (41) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:838:44: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 838 | pc->day = $5.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 838 | pc->day = $5.value; | | | | | | | (38) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:838:44: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 838 | pc->day = $5.value; | ^ 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(87) ...to here | 'yyparse': events 88-90 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (88) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(89) ...to here |...... | 838 | pc->day = $5.value; | | | | | | | (90) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:847:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 847 | pc->month = $1.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 43:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': events 22-24 gl/parse-datetime.y:826:12: 826 | if (4 <= $1.digits) | ^ | | | (22) following 'false' branch... ->-+ | | ...... | | |+-----------------------------------------------+ 842 || if (debugging (pc)) || ~ || | |+----------->(23) ...to here ...... 847 | pc->month = $1.value; | | | | (24) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:847:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 847 | pc->month = $1.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:847:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': events 39-41 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (39) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(40) ...to here |...... | 847 | pc->month = $1.value; | | | | | | | (41) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 847 | pc->month = $1.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:847:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 847 | pc->month = $1.value; | | | | | | | (38) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 847 | pc->month = $1.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:847:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': events 82-84 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (82) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(83) ...to here |...... | 847 | pc->month = $1.value; | | | | | | | (84) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 847 | pc->month = $1.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:848:45: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 848 | pc->day = $3.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 43:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': events 22-24 gl/parse-datetime.y:826:12: 826 | if (4 <= $1.digits) | ^ | | | (22) following 'false' branch... ->-+ | | ...... | | |+-----------------------------------------------+ 842 || if (debugging (pc)) || ~ || | |+----------->(23) ...to here ...... 848 | pc->day = $3.value; | | | | (24) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:848:45: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 848 | pc->day = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:848:45: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': events 39-41 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (39) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(40) ...to here |...... | 848 | pc->day = $3.value; | | | | | | | (41) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:848:45: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 848 | pc->day = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:848:45: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 848 | pc->day = $3.value; | | | | | | | (38) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:848:45: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 848 | pc->day = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:848:45: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': events 82-84 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (82) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(83) ...to here |...... | 848 | pc->day = $3.value; | | | | | | | (84) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:848:45: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 848 | pc->day = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:849:22: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 849 | pc->year = $5; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 43:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': events 22-24 gl/parse-datetime.y:826:12: 826 | if (4 <= $1.digits) | ^ | | | (22) following 'false' branch... ->-+ | | ...... | | |+-----------------------------------------------+ 842 || if (debugging (pc)) || ~ || | |+----------->(23) ...to here ...... 849 | pc->year = $5; | ~ | | | (24) use of uninitialized value 'yyvsp_221->textintval' here gl/parse-datetime.y:849:22: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 849 | pc->year = $5; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 849 | pc->year = $5; | | ~ | | | | | (38) use of uninitialized value 'yyvsp_221->textintval' here | gl/parse-datetime.y:855:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 855 | pc->day = $1.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 44:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:855:41: 855 | pc->day = $1.value; | ^ | | | (22) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:855:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:855:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:855:41: | 855 | pc->day = $1.value; | | ^ | | | | | (39) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:855:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:855:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:855:41: | 855 | pc->day = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:855:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:855:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:855:41: | 855 | pc->day = $1.value; | | ^ | | | | | (82) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:855:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:856:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 856 | pc->month = $3.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 44:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:856:43: 856 | pc->month = $3.value; | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:856:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:856:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:856:43: | 856 | pc->month = $3.value; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:856:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:856:43: | 856 | pc->month = $3.value; | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:856:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:856:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:856:43: | 856 | pc->month = $3.value; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:861:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 861 | pc->day = $1.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 45:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:861:41: 861 | pc->day = $1.value; | ^ | | | (22) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:861:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:861:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:861:41: | 861 | pc->day = $1.value; | | ^ | | | | | (39) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:861:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:861:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:861:41: | 861 | pc->day = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:861:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:861:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:861:41: | 861 | pc->day = $1.value; | | ^ | | | | | (82) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:861:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:862:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 862 | pc->month = $3.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 45:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:862:43: 862 | pc->month = $3.value; | ^ | | | (22) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:862:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:862:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:862:43: | 862 | pc->month = $3.value; | | ^ | | | | | (39) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:862:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:862:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:862:43: | 862 | pc->month = $3.value; | | ^ | | | | | (36) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:862:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:862:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:862:43: | 862 | pc->month = $3.value; | | ^ | | | | | (82) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:862:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:863:18: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 863 | pc->year = $5; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 45:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:863:18: 863 | pc->year = $5; | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval' here gl/parse-datetime.y:863:18: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:863:18: | 863 | pc->year = $5; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval' here | gl/parse-datetime.y:868:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 868 | pc->day = $1.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 46:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:868:41: 868 | pc->day = $1.value; | ^ | | | (22) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:868:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:868:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:868:41: | 868 | pc->day = $1.value; | | ^ | | | | | (39) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:868:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:868:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:868:41: | 868 | pc->day = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:868:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:868:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:868:41: | 868 | pc->day = $1.value; | | ^ | | | | | (82) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:868:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:869:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 869 | pc->month = $2; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 46:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:869:31: 869 | pc->month = $2; | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:869:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:869:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:869:31: | 869 | pc->month = $2; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:869:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:869:31: | 869 | pc->month = $2; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:869:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:869:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:869:31: | 869 | pc->month = $2; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:870:13: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 870 | if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 46:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:870:13: 870 | if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval.value' here gl/parse-datetime.y:870:13: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:870:13: | 870 | if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:876:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 876 | pc->month = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 47:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:876:31: 876 | pc->month = $1; | ^ | | | (22) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:876:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |104 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:876:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:876:31: | 876 | pc->month = $1; | | ^ | | | | | (39) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:876:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:876:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:876:31: | 876 | pc->month = $1; | | ^ | | | | | (36) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:876:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |104 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:876:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:876:31: | 876 | pc->month = $1; | | ^ | | | | | (82) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:876:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:877:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 47:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:877:13: 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:877:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:877:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:877:13: | 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:877:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:877:13: | 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:877:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:877:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:877:13: | 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:878:13: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 878 | if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 47:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': events 22-24 gl/parse-datetime.y:877:12: 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | ^ | | | (22) following 'false' branch... ->-+ | | | | |+-----------------------------------------------+ 878 || if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; || ~ ~ || | | || | (24) use of uninitialized value 'yyvsp_221->textintval.value' here |+------->(23) ...to here gl/parse-datetime.y:878:13: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 878 | if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:877:12: | 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | | ^ | | | | | (36) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------------+ | 878 || if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; | || ~ ~ | || | | | || | (38) use of uninitialized value 'yyvsp_221->textintval.value' here | |+------->(37) ...to here | gl/parse-datetime.y:883:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 883 | pc->month = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 48:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2198 || case 48: /* date: tMONTH tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:883:31: 883 | pc->month = $1; | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:883:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:883:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 48:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2198 || case 48: /* date: tMONTH tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:883:31: | 883 | pc->month = $1; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:883:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 48:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2198 || case 48: /* date: tMONTH tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:883:31: | 883 | pc->month = $1; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:883:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:883:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 48:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2198 || case 48: /* date: tMONTH tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:883:31: | 883 | pc->month = $1; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:884:40: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 884 | pc->day = $2.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 48:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2198 || case 48: /* date: tMONTH tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:884:40: 884 | pc->day = $2.value; | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval.value' here gl/parse-datetime.y:884:40: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 48:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2198 || case 48: /* date: tMONTH tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:884:40: | 884 | pc->day = $2.value; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:888:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 888 | pc->month = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 49:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:888:31: 888 | pc->month = $1; | ^ | | | (22) out-of-bounds read from byte -168 till byte -161 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:888:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |160 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:888:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:888:31: | 888 | pc->month = $1; | | ^ | | | | | (39) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:888:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |104 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:888:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:888:31: | 888 | pc->month = $1; | | ^ | | | | | (36) out-of-bounds read from byte -168 till byte -161 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:888:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |160 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:888:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:888:31: | 888 | pc->month = $1; | | ^ | | | | | (82) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:888:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |104 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:889:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 889 | pc->day = $2.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 49:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:889:41: 889 | pc->day = $2.value; | ^ | | | (22) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:889:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:889:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:889:41: | 889 | pc->day = $2.value; | | ^ | | | | | (39) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:889:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:889:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:889:41: | 889 | pc->day = $2.value; | | ^ | | | | | (36) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:889:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:889:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:889:41: | 889 | pc->day = $2.value; | | ^ | | | | | (82) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:889:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:890:18: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 890 | pc->year = $4; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 49:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:890:18: 890 | pc->year = $4; | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval' here gl/parse-datetime.y:890:18: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:890:18: | 890 | pc->year = $4; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval' here | gl/parse-datetime.y:894:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 894 | pc->day = $1.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 50:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2217 || case 50: /* date: tUNUMBER tMONTH */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:894:41: 894 | pc->day = $1.value; | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:894:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:894:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 50:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2217 || case 50: /* date: tUNUMBER tMONTH */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:894:41: | 894 | pc->day = $1.value; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:894:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 50:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2217 || case 50: /* date: tUNUMBER tMONTH */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:894:41: | 894 | pc->day = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:894:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:894:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 50:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2217 || case 50: /* date: tUNUMBER tMONTH */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:894:41: | 894 | pc->day = $1.value; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:895:30: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 895 | pc->month = $2; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 50:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2217 || case 50: /* date: tUNUMBER tMONTH */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:895:30: 895 | pc->month = $2; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:895:30: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 50:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2217 || case 50: /* date: tUNUMBER tMONTH */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:895:30: | 895 | pc->month = $2; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:899:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 899 | pc->day = $1.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 51:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:899:41: 899 | pc->day = $1.value; | ^ | | | (22) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:899:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:899:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:899:41: | 899 | pc->day = $1.value; | | ^ | | | | | (39) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:899:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:899:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:899:41: | 899 | pc->day = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:899:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:899:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:899:41: | 899 | pc->day = $1.value; | | ^ | | | | | (82) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:899:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:900:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 900 | pc->month = $2; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 51:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:900:31: 900 | pc->month = $2; | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:900:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:900:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:900:31: | 900 | pc->month = $2; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:900:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:900:31: | 900 | pc->month = $2; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:900:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:900:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:900:31: | 900 | pc->month = $2; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:901:18: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 901 | pc->year = $3; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 51:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:901:18: 901 | pc->year = $3; | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval' here gl/parse-datetime.y:901:18: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:901:18: | 901 | pc->year = $3; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval' here | gl/parse-datetime.y:910:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 910 | pc->year = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 53:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:910:18: 910 | pc->year = $1; | ^ | | | (22) out-of-bounds read from byte -112 till byte -89 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:910:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+---+ +--------+-------+ |under-read of 24 bytes| |88 bytes| |size: 1120 bytes| +----------------------+ +--------+ +----------------+ gl/parse-datetime.y:910:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:910:18: | 910 | pc->year = $1; | | ^ | | | | | (39) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:910:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+---+ +--------+-------+ |under-read of 24 bytes| |32 bytes| |size: 1120 bytes| +----------------------+ +--------+ +----------------+ gl/parse-datetime.y:910:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:910:18: | 910 | pc->year = $1; | | ^ | | | | | (36) out-of-bounds read from byte -112 till byte -89 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:910:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+---+ +--------+-------+ |under-read of 24 bytes| |88 bytes| |size: 1120 bytes| +----------------------+ +--------+ +----------------+ gl/parse-datetime.y:910:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:910:18: | 910 | pc->year = $1; | | ^ | | | | | (82) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:910:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+---+ +--------+-------+ |under-read of 24 bytes| |32 bytes| |size: 1120 bytes| +----------------------+ +--------+ +----------------+ gl/parse-datetime.y:911:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 53:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:911:13: 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:911:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:911:13: | 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:911:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:911:13: | 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:911:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:911:13: | 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:912:13: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 912 | if (ckd_sub (&pc->day, 0, $3.value)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 53:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': events 22-24 gl/parse-datetime.y:911:12: 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | ^ | | | (22) following 'false' branch... ->-+ | | | | |+-----------------------------------------------+ 912 || if (ckd_sub (&pc->day, 0, $3.value)) YYABORT; || ~ ~ || | | || | (24) use of uninitialized value 'yyvsp_221->textintval.value' here |+------->(23) ...to here gl/parse-datetime.y:912:13: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 912 | if (ckd_sub (&pc->day, 0, $3.value)) YYABORT; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:911:12: | 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | | ^ | | | | | (36) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------------+ | 912 || if (ckd_sub (&pc->day, 0, $3.value)) YYABORT; | || ~ ~ | || | | | || | (38) use of uninitialized value 'yyvsp_221->textintval.value' here | |+------->(37) ...to here | gl/parse-datetime.y:918:15: warning: use of uninitialized value '_136->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 918 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | ^ 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 54:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2247 || case 54: /* rel: relunit tAGO */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:918:15: | 918 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (39) use of uninitialized value '_136->rel' here | gl/parse-datetime.y:918:15: warning: use of uninitialized value '_136->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 54:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2247 || case 54: /* rel: relunit tAGO */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:918:15: | 918 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (82) use of uninitialized value '_136->rel' here | gl/parse-datetime.y:918:66: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 918 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 54:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2247 || case 54: /* rel: relunit tAGO */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:918:66: 918 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:918:66: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 54:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2247 || case 54: /* rel: relunit tAGO */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:918:66: | 918 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:920:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 920 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 55:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2253 || case 55: /* rel: relunit */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:920:15: 920 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->rel' here gl/parse-datetime.y:920:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 55:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2253 || case 55: /* rel: relunit */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:920:15: | 920 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->rel' here | gl/parse-datetime.y:922:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 922 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 56:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2259 || case 56: /* rel: dayshift */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:922:15: 922 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->rel' here gl/parse-datetime.y:922:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 56:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2259 || case 56: /* rel: dayshift */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:922:15: | 922 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->rel' here | gl/parse-datetime.y:927:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 927 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 57:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2265 || case 57: /* relunit: tORDINAL tYEAR_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:927:69: 927 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:927:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:927:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 57:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2265 || case 57: /* relunit: tORDINAL tYEAR_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:927:69: | 927 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:927:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 57:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2265 || case 57: /* relunit: tORDINAL tYEAR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:927:69: | 927 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:927:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:927:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 57:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2265 || case 57: /* relunit: tORDINAL tYEAR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:927:69: | 927 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:929:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 929 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 58:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2271 || case 58: /* relunit: tUNUMBER tYEAR_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:929:81: 929 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:929:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:929:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 58:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2271 || case 58: /* relunit: tUNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:929:81: | 929 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:929:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 58:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2271 || case 58: /* relunit: tUNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:929:81: | 929 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:929:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:929:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 58:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2271 || case 58: /* relunit: tUNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:929:81: | 929 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:933:70: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 933 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 60:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2283 || case 60: /* relunit: tORDINAL tMONTH_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:933:70: 933 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:933:70: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:933:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 60:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2283 || case 60: /* relunit: tORDINAL tMONTH_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:933:70: | 933 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:933:70: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 60:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2283 || case 60: /* relunit: tORDINAL tMONTH_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:933:70: | 933 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:933:70: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:933:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 60:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2283 || case 60: /* relunit: tORDINAL tMONTH_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:933:70: | 933 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:935:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 935 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 61:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2289 || case 61: /* relunit: tUNUMBER tMONTH_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:935:82: 935 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:935:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:935:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 61:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2289 || case 61: /* relunit: tUNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:935:82: | 935 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:935:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 61:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2289 || case 61: /* relunit: tUNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:935:82: | 935 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:935:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:935:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 61:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2289 || case 61: /* relunit: tUNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:935:82: | 935 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:940:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 63:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2301 || case 63: /* relunit: tORDINAL tDAY_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:940:13: 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:940:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:940:13: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 63:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2301 || case 63: /* relunit: tORDINAL tDAY_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:940:13: 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:940:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 63:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2301 || case 63: /* relunit: tORDINAL tDAY_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:940:13: | 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:940:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 63:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2301 || case 63: /* relunit: tORDINAL tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:940:13: | 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:940:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:940:13: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 63:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2301 || case 63: /* relunit: tORDINAL tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:940:13: | 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:940:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 63:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2301 || case 63: /* relunit: tORDINAL tDAY_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:940:13: | 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:943:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 64:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2308 || case 64: /* relunit: tUNUMBER tDAY_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:943:13: 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:943:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:943:13: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 64:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2308 || case 64: /* relunit: tUNUMBER tDAY_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:943:13: 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:943:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 64:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2308 || case 64: /* relunit: tUNUMBER tDAY_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:943:13: | 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:943:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 64:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2308 || case 64: /* relunit: tUNUMBER tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:943:13: | 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:943:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:943:13: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 64:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2308 || case 64: /* relunit: tUNUMBER tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:943:13: | 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:943:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 64:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2308 || case 64: /* relunit: tUNUMBER tDAY_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:943:13: | 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:945:67: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 945 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 65:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2315 || case 65: /* relunit: tDAY_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:945:67: 945 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:945:67: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 65:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2315 || case 65: /* relunit: tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:945:67: | 945 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:947:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 947 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 66:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2321 || case 66: /* relunit: tORDINAL tHOUR_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:947:69: 947 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:947:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:947:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 66:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2321 || case 66: /* relunit: tORDINAL tHOUR_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:947:69: | 947 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:947:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 66:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2321 || case 66: /* relunit: tORDINAL tHOUR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:947:69: | 947 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:947:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:947:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 66:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2321 || case 66: /* relunit: tORDINAL tHOUR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:947:69: | 947 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:949:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 949 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 67:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2327 || case 67: /* relunit: tUNUMBER tHOUR_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:949:81: 949 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:949:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:949:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 67:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2327 || case 67: /* relunit: tUNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:949:81: | 949 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:949:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 67:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2327 || case 67: /* relunit: tUNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:949:81: | 949 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:949:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:949:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 67:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2327 || case 67: /* relunit: tUNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:949:81: | 949 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:953:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 69:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2339 || case 69: /* relunit: tORDINAL tMINUTE_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:953:72: 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:953:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:953:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 69:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2339 || case 69: /* relunit: tORDINAL tMINUTE_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:953:72: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:953:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 69:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2339 || case 69: /* relunit: tORDINAL tMINUTE_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:953:72: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:953:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:953:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 69:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2339 || case 69: /* relunit: tORDINAL tMINUTE_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:953:72: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:955:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 955 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 70:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2345 || case 70: /* relunit: tUNUMBER tMINUTE_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:955:84: 955 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:955:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 70:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2345 || case 70: /* relunit: tUNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:955:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 70:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2345 || case 70: /* relunit: tUNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:955:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 70:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2345 || case 70: /* relunit: tUNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:959:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 959 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 72:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2357 || case 72: /* relunit: tORDINAL tSEC_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:959:72: 959 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:959:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:959:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 72:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2357 || case 72: /* relunit: tORDINAL tSEC_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:959:72: | 959 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:959:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 72:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2357 || case 72: /* relunit: tORDINAL tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:959:72: | 959 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:959:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:959:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 72:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2357 || case 72: /* relunit: tORDINAL tSEC_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:959:72: | 959 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:961:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 961 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 73:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2363 || case 73: /* relunit: tUNUMBER tSEC_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:961:84: 961 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:961:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:961:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 73:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2363 || case 73: /* relunit: tUNUMBER tSEC_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:961:84: | 961 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:961:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 73:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2363 || case 73: /* relunit: tUNUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:961:84: | 961 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:961:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:961:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 73:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2363 || case 73: /* relunit: tUNUMBER tSEC_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:961:84: | 961 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:963:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 74:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2369 || case 74: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:963:82: 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:963:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:963:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 74:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2369 || case 74: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:963:82: | 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:963:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 74:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2369 || case 74: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:963:82: | 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:963:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:963:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 74:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2369 || case 74: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:963:82: | 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:963:128: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 74:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2369 || case 74: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:963:128: 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:963:128: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:963:128: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 74:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2369 || case 74: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:963:128: | 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:963:128: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:965:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 75:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2375 || case 75: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:965:82: 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:965:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:965:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 75:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2375 || case 75: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:965:82: | 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:965:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 75:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2375 || case 75: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:965:82: | 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:965:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:965:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 75:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2375 || case 75: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:965:82: | 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:965:128: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 75:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2375 || case 75: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:965:128: 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:965:128: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:965:128: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 75:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2375 || case 75: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:965:128: | 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:965:128: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:973:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 973 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 78:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2387 || case 78: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:973:81: 973 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:973:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:973:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 78:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2387 || case 78: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:973:81: | 973 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:973:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 78:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2387 || case 78: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:973:81: | 973 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:973:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:973:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 78:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2387 || case 78: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:973:81: | 973 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:975:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 975 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 79:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2393 || case 79: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:975:82: 975 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:975:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:975:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 79:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2393 || case 79: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:975:82: | 975 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:975:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 79:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2393 || case 79: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:975:82: | 975 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:975:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:975:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 79:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2393 || case 79: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:975:82: | 975 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:978:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 80:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2399 || case 80: /* relunit_snumber: tSNUMBER tDAY_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:978:13: 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:978:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:978:13: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 80:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2399 || case 80: /* relunit_snumber: tSNUMBER tDAY_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:978:13: 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:978:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 80:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2399 || case 80: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:978:13: | 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:978:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 80:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2399 || case 80: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:978:13: | 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:978:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:978:13: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 80:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2399 || case 80: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:978:13: | 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:978:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 80:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2399 || case 80: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:978:13: | 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:980:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 980 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 81:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2406 || case 81: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:980:81: 980 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:980:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:980:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 81:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2406 || case 81: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:980:81: | 980 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:980:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 81:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2406 || case 81: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:980:81: | 980 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:980:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:980:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 81:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2406 || case 81: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:980:81: | 980 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:982:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 982 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 82:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2412 || case 82: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:982:84: 982 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:982:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:982:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 82:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2412 || case 82: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:982:84: | 982 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:982:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 82:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2412 || case 82: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:982:84: | 982 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:982:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:982:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 82:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2412 || case 82: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:982:84: | 982 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:984:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 984 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 83:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2418 || case 83: /* relunit_snumber: tSNUMBER tSEC_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:984:84: 984 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:984:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:984:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 83:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2418 || case 83: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:984:84: | 984 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:984:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 83:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2418 || case 83: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:984:84: | 984 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:984:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:984:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 83:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2418 || case 83: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:984:84: | 984 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:989:67: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 989 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 84:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2424 || case 84: /* dayshift: tDAY_SHIFT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:989:67: 989 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:989:67: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 84:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2424 || case 84: /* dayshift: tDAY_SHIFT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:989:67: | 989 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:998:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 998 | $$ = (struct timespec) { .tv_sec = $1.value }; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 88:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2430 || case 88: /* signed_seconds: tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:998:79: 998 | $$ = (struct timespec) { .tv_sec = $1.value }; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval.value' here gl/parse-datetime.y:998:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 88:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2430 || case 88: /* signed_seconds: tSNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:998:79: | 998 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (39) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:998:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 88:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2430 || case 88: /* signed_seconds: tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:998:79: | 998 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:998:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 88:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2430 || case 88: /* signed_seconds: tSNUMBER */ | || ~ | || | | |+->(87) ...to here | 'yyparse': event 88 | |gl/parse-datetime.y:998:79: | 998 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (88) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1005:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1005 | $$ = (struct timespec) { .tv_sec = $1.value }; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 90:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2437 || case 90: /* unsigned_seconds: tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:1005:79: 1005 | $$ = (struct timespec) { .tv_sec = $1.value }; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval.value' here gl/parse-datetime.y:1005:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 90:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2437 || case 90: /* unsigned_seconds: tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:1005:79: | 1005 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (39) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1005:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 90:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2437 || case 90: /* unsigned_seconds: tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:1005:79: | 1005 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1005:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 90:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2437 || case 90: /* unsigned_seconds: tUNUMBER */ | || ~ | || | | |+->(87) ...to here | 'yyparse': event 88 | |gl/parse-datetime.y:1005:79: | 1005 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (88) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1010:9: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1010 | { digits_to_date_time (pc, $1); } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 91:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2444 || case 91: /* number: tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:1010:9: 1010 | { digits_to_date_time (pc, $1); } | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval' here gl/parse-datetime.y:1010:9: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 91:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2444 || case 91: /* number: tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:1010:9: | 1010 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval' here | gl/parse-datetime.y:1018:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 1018 | digits_to_date_time (pc, $1); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 92:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2450 || case 92: /* hybrid: tUNUMBER relunit_snumber */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:1018:9: 1018 | digits_to_date_time (pc, $1); | ^ | | | (22) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:1018:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+---+ +--------+-------+ |under-read of 24 bytes| |32 bytes| |size: 1120 bytes| +----------------------+ +--------+ +----------------+ gl/parse-datetime.y:1018:9: warning: use of uninitialized value '_180->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 92:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2450 || case 92: /* hybrid: tUNUMBER relunit_snumber */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:1018:9: | 1018 | digits_to_date_time (pc, $1); | | ^ | | | | | (39) use of uninitialized value '_180->textintval' here | gl/parse-datetime.y:1018:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 92:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2450 || case 92: /* hybrid: tUNUMBER relunit_snumber */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:1018:9: | 1018 | digits_to_date_time (pc, $1); | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:1018:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+---+ +--------+-------+ |under-read of 24 bytes| |32 bytes| |size: 1120 bytes| +----------------------+ +--------+ +----------------+ gl/parse-datetime.y:1018:9: warning: use of uninitialized value '_180->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 92:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2450 || case 92: /* hybrid: tUNUMBER relunit_snumber */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:1018:9: | 1018 | digits_to_date_time (pc, $1); | | ^ | | | | | (82) use of uninitialized value '_180->textintval' here | gl/parse-datetime.y:1027:47: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1027 | { $$ = $2.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 94:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2467 || case 94: /* o_colon_minutes: ':' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:1027:47: 1027 | { $$ = $2.value; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval.value' here gl/parse-datetime.y:1027:47: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 94:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2467 || case 94: /* o_colon_minutes: ':' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:1027:47: | 1027 | { $$ = $2.value; } | | ^ | | | | | (39) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1027:47: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 94:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2467 || case 94: /* o_colon_minutes: ':' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:1027:47: | 1027 | { $$ = $2.value; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1027:47: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 94:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2467 || case 94: /* o_colon_minutes: ':' tUNUMBER */ | || ~ | || | | |+->(87) ...to here | 'yyparse': event 88 | |gl/parse-datetime.y:1027:47: | 1027 | { $$ = $2.value; } | | ^ | | | | | (88) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.c:2601:12: warning: use of uninitialized value 'yylval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 2601 | *++yyvsp = yylval; | ^ 'yyparse': events 1-4 | | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1601 | YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); | | ~ | | | | | (2) region created on stack here | | (3) capacity: 56 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | | 'yyparse': events 5-12 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(5) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (6) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(7) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (8) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (10) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(9) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(11) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (12) calling 'yylex' from 'yyparse' | +--> 'yylex': events 13-14 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (13) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (14) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 15-16 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (15) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(16) ...to here | <-------------+ | 'yyparse': events 17-20 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (17) returning to 'yyparse' from 'yylex' |...... | 1819 | if (yyn == 0) | | ~ | | | | | (18) following 'true' branch (when 'yyn_250 == 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1820 || goto yyerrlab; | || ~ | || | | |+--->(19) ...to here |...... | 2518 | if (!yyerrstatus) | | ~ | | | | | (20) following 'true' branch (when 'yyerrstatus_214 == 0')... ->-+ | | | | 'yyparse': events 21-28 | | | | | |+----------------------------------------------------------------------+ | 2518 || if (!yyerrstatus) | || ^ | || | | |+---->(21) ...to here |...... | 2577 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (22) following 'true' branch (when 'yyn_397 != -93')... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 2578 || { | 2579 || yyn += YYSYMBOL_YYerror; | || ~ | || | | |+--------->(23) ...to here | 2580 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+------------------------------------------------+ | 2581 || { | 2582 || yyn = yytable[yyn]; | || ~ | || | | |+------------->(25) ...to here | 2583 | if (0 < yyn) | | ~ | | | | | (26) following 'true' branch (when 'yyn_399 > 0')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 2601 || *++yyvsp = yylval; | || ~ ~ | || | | | || | (28) use of uninitialized value 'yylval' here | |+->(27) ...to here | gl/parse-datetime.c:2601:12: warning: use of uninitialized value 'yylval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 2601 | *++yyvsp = yylval; | ^ 'parse_datetime_body': events 1-6 | |gl/parse-datetime.y:1767:1: | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-17 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1601 | YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); | | ~ | | | | | (15) region created on stack here | | (16) capacity: 56 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (17) following 'false' branch... ->-+ | | | | 'yyparse': events 18-25 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(18) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (19) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(20) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (21) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (23) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(22) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(24) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (25) calling 'yylex' from 'yyparse' | +--> 'yylex': events 26-27 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (26) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (27) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 28-29 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (28) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(29) ...to here | <-------------+ | 'yyparse': events 30-33 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (30) returning to 'yyparse' from 'yylex' |...... | 1819 | if (yyn == 0) | | ~ | | | | | (31) following 'true' branch (when 'yyn_250 == 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1820 || goto yyerrlab; | || ~ | || | | |+--->(32) ...to here |...... | 2518 | if (!yyerrstatus) | | ~ | | | | | (33) following 'true' branch (when 'yyerrstatus_214 == 0')... ->-+ | | | | 'yyparse': events 34-41 | | | | | |+----------------------------------------------------------------------+ | 2518 || if (!yyerrstatus) | || ^ | || | | |+---->(34) ...to here |...... | 2577 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (35) following 'true' branch (when 'yyn_397 != -93')... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 2578 || { | 2579 || yyn += YYSYMBOL_YYerror; | || ~ | || | | |+--------->(36) ...to here | 2580 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (37) following 'true' branch... ->-+ | | | | | | | |+------------------------------------------------+ | 2581 || { | 2582 || yyn = yytable[yyn]; | || ~ | || | | |+------------->(38) ...to here | 2583 | if (0 < yyn) | | ~ | | | | | (39) following 'true' branch (when 'yyn_399 > 0')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 2601 || *++yyvsp = yylval; | || ~ ~ | || | | | || | (41) use of uninitialized value 'yylval' here | |+->(40) ...to here | cli.c: In function 'try_resume.isra': cli.c:1049:28: warning: 'size' may be used uninitialized [-Wmaybe-uninitialized] 1049 | edata.size = size; | ^ cli.c:1040:24: note: 'size' was declared here 1040 | size_t size; | ^ gl/parse-datetime.y: In function 'digits_to_date_time': gl/parse-datetime.y:273:1: warning: use of uninitialized value 'text_int.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 273 | digits_to_date_time (parser_control *pc, textint text_int) | ^ 'yyparse': events 1-2 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | | 'yyparse': events 3-10 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(3) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(5) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(7) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(9) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (10) calling 'yylex' from 'yyparse' | +--> 'yylex': events 11-12 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (11) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (12) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 13-16 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (13) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (14) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (16) following 'true' branch (when the strings are equal)... ->-+ | |+--->(15) ...to here | | | | | 'lookup_word': event 17 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(17) ...to here | <------+ | 'yylex': events 18-20 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (18) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (19) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(20) ...to here | <------+ | 'yyparse': events 21-26 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (21) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (22) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(23) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(25) ...to here | | | | | 'yyparse': events 27-28 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (28) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(27) ...to here | 'yyparse': events 29-37 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(29) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (30) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(31) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (32) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(33) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (34) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(35) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (36) following 'case 91:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2444 || case 91: /* number: tUNUMBER */ | || ~ | || | | |+->(37) ...to here | 'yyparse': event 38 | |gl/parse-datetime.y:1010:9: | 1010 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (38) calling 'digits_to_date_time' from 'yyparse' | +--> 'digits_to_date_time': events 39-41 | | 273 | digits_to_date_time (parser_control *pc, textint text_int) | | ^ ~ | | | | | | (39) entry to 'digits_to_date_time' (40) region created on stack here | | (41) use of uninitialized value 'text_int.value' here | gl/parse-datetime.y:273:1: warning: use of uninitialized value 'text_int.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-51 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (51) following 'false' branch... ->-+ | | | | 'yyparse': events 52-59 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(52) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (53) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(54) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (55) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (57) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(56) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(58) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (59) calling 'yylex' from 'yyparse' | +--> 'yylex': events 60-61 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (60) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (61) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 62-65 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (62) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (63) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (65) following 'true' branch (when the strings are equal)... ->-+ | |+--->(64) ...to here | | | | | 'lookup_word': event 66 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(66) ...to here | <------+ | 'yylex': events 67-69 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (67) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (68) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(69) ...to here | <------+ | 'yyparse': events 70-75 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (70) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (71) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(72) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (73) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (75) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(74) ...to here | | | | | 'yyparse': events 76-77 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (77) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(76) ...to here | 'yyparse': events 78-86 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(78) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (79) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(80) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (81) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(82) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(84) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (85) following 'case 91:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2444 || case 91: /* number: tUNUMBER */ | || ~ | || | | |+->(86) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:1010:9: | 1010 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (87) calling 'digits_to_date_time' from 'yyparse' | +--> 'digits_to_date_time': events 88-90 | | 273 | digits_to_date_time (parser_control *pc, textint text_int) | | ^ ~ | | | | | | (88) entry to 'digits_to_date_time' (89) region created on stack here | | (90) use of uninitialized value 'text_int.value' here | gl/parse-datetime.y: In function 'apply_relative_time': gl/parse-datetime.y:313:1: warning: use of uninitialized value 'rel.month' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 313 | apply_relative_time (parser_control *pc, relative_time rel, int factor) | ^ 'yyparse': events 1-2 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | | 'yyparse': events 3-10 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(3) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(5) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(7) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(9) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (10) calling 'yylex' from 'yyparse' | +--> 'yylex': events 11-12 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (11) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (12) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 13-16 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (13) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (14) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (16) following 'true' branch (when the strings are equal)... ->-+ | |+--->(15) ...to here | | | | | 'lookup_word': event 17 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(17) ...to here | <------+ | 'yylex': events 18-20 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (18) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (19) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(20) ...to here | <------+ | 'yyparse': events 21-26 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (21) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (22) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(23) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(25) ...to here | | | | | 'yyparse': events 27-28 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (28) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(27) ...to here | 'yyparse': events 29-37 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(29) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (30) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(31) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (32) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(33) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (34) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(35) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (36) following 'case 55:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2253 || case 55: /* rel: relunit */ | || ~ | || | | |+->(37) ...to here | 'yyparse': event 38 | |gl/parse-datetime.y:920:15: | 920 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (38) calling 'apply_relative_time' from 'yyparse' | +--> 'apply_relative_time': events 39-41 | | 313 | apply_relative_time (parser_control *pc, relative_time rel, int factor) | | ^ ~ | | | | | | (39) entry to 'apply_relative_time' (40) region created on stack here | | (41) use of uninitialized value 'rel.month' here | gl/parse-datetime.y:313:1: warning: use of uninitialized value 'rel.month' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-51 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (51) following 'false' branch... ->-+ | | | | 'yyparse': events 52-59 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(52) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (53) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(54) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (55) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (57) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(56) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(58) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (59) calling 'yylex' from 'yyparse' | +--> 'yylex': events 60-61 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (60) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (61) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 62-65 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (62) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (63) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (65) following 'true' branch (when the strings are equal)... ->-+ | |+--->(64) ...to here | | | | | 'lookup_word': event 66 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(66) ...to here | <------+ | 'yylex': events 67-69 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (67) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (68) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(69) ...to here | <------+ | 'yyparse': events 70-75 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (70) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (71) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(72) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (73) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (75) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(74) ...to here | | | | | 'yyparse': events 76-77 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (77) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(76) ...to here | 'yyparse': events 78-86 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(78) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (79) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(80) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (81) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(82) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(84) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (85) following 'case 55:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2253 || case 55: /* rel: relunit */ | || ~ | || | | |+->(86) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:920:15: | 920 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (87) calling 'apply_relative_time' from 'yyparse' | +--> 'apply_relative_time': events 88-90 | | 313 | apply_relative_time (parser_control *pc, relative_time rel, int factor) | | ^ ~ | | | | | | (88) entry to 'apply_relative_time' (89) region created on stack here | | (90) use of uninitialized value 'rel.month' here | gl/read-file.c: In function '_gnutls_fread_file': gl/read-file.c:198:13: warning: leak of FILE 'fopen (filename_11(D), mode_4)' [CWE-775] [-Wanalyzer-file-leak] 198 | if (flags & RF_SENSITIVE) | ^ '_gnutls_read_file': events 1-6 | | 190 | read_file (const char *filename, int flags, size_t *length) | | ^ | | | | | (1) entry to '_gnutls_read_file' |...... | 193 | FILE *stream = fopen (filename, mode); | | ~ | | | | | (2) opened here | 194 | | 195 | if (!stream) | | ~ | | | | | (3) assuming 'fopen (filename_11(D), mode_4)' is non-NULL | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 198 || if (flags & RF_SENSITIVE) | || ~ | || | | |+->(5) ...to here |...... | 201 | char *out = fread_file (stream, flags, length); | | ~ | | | | | (6) calling '_gnutls_fread_file' from '_gnutls_read_file' | +--> '_gnutls_fread_file': events 7-10 | | 52 | fread_file (FILE *stream, int flags, size_t *length) | | ^ | | | | | (7) entry to '_gnutls_fread_file' |...... | 61 | if (fstat (fileno (stream), &st) >= 0 && S_ISREG (st.st_mode)) | | ~ | | | | | (8) following 'true' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 62 || { | 63 || off_t pos = ftello (stream); | || ~ ~ | || | | | || | (10) if 'ftello' throws an exception... | |+------->(9) ...to here | '_gnutls_read_file': event 11 | | 198 | if (flags & RF_SENSITIVE) | | ^ | | | | | (11) 'fopen (filename_11(D), mode_4)' leaks here; was opened at (2) | gl/parse-datetime.c: In function 'yyparse': gl/parse-datetime.c:1806:12: warning: use of uninitialized value 'yylval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1806 | *++yyvsp = yylval; | ^ 'yyparse': events 1-4 | | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1601 | YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); | | ~ | | | | | (2) region created on stack here | | (3) capacity: 56 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | | 'yyparse': events 5-12 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(5) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (6) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(7) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (8) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (10) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(9) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(11) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (12) calling 'yylex' from 'yyparse' | +--> 'yylex': events 13-14 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (13) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (14) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 15-16 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (15) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(16) ...to here | <-------------+ | 'yyparse': events 17-22 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (17) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (18) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(19) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (20) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (22) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(21) ...to here | | | | | 'yyparse': events 23-24 | | | | | |+-----------------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(23) ...to here |...... | 1806 | *++yyvsp = yylval; | | ~ | | | | | (24) use of uninitialized value 'yylval' here | gl/parse-datetime.c:1806:12: warning: use of uninitialized value 'yylval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1806 | *++yyvsp = yylval; | ^ 'parse_datetime_body': events 1-6 | |gl/parse-datetime.y:1767:1: | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-17 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1601 | YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); | | ~ | | | | | (15) region created on stack here | | (16) capacity: 56 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (17) following 'false' branch... ->-+ | | | | 'yyparse': events 18-25 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(18) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (19) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(20) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (21) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (23) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(22) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(24) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (25) calling 'yylex' from 'yyparse' | +--> 'yylex': events 26-27 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (26) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (27) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 28-29 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (28) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(29) ...to here | <-------------+ | 'yyparse': events 30-35 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (30) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (31) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(32) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (33) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (35) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(34) ...to here | | | | | 'yyparse': events 36-37 | | | | | |+-----------------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(36) ...to here |...... | 1806 | *++yyvsp = yylval; | | ~ | | | | | (37) use of uninitialized value 'yylval' here | gl/parse-datetime.c:1839:9: warning: use of uninitialized value '*_14' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1839 | yyval = yyvsp[1-yylen]; | ^ 'yyparse': events 1-2 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-8 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1819 | if (yyn == 0) | ~ | | | (6) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1820 || goto yyerrlab; 1821 || goto yyreduce; || ~ || | |+->(7) ...to here ...... 1839 | yyval = yyvsp[1-yylen]; | ~ | | | (8) use of uninitialized value '*_14' here gl/parse-datetime.c:1839:9: warning: use of uninitialized value '*_14' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1839 | yyval = yyvsp[1-yylen]; | ^ 'yyparse': events 1-3 | | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (13) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 14-15 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (14) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(15) ...to here | <-------------+ | 'yyparse': events 16-21 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (16) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (17) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(18) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (19) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(20) ...to here |...... | 1839 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (21) use of uninitialized value '*_14' here | gl/parse-datetime.c:1839:9: warning: use of uninitialized value '*_14' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1839 | yyval = yyvsp[1-yylen]; | ^ 'parse_datetime_body': events 1-6 | |gl/parse-datetime.y:1767:1: | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-22 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (20) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(21) ...to here |...... | 1839 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (22) use of uninitialized value '*_14' here | gl/parse-datetime.c:1839:9: warning: use of uninitialized value '*_14' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1839 | yyval = yyvsp[1-yylen]; | ^ 'parse_datetime_body': events 1-6 | |gl/parse-datetime.y:1767:1: | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-24 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (24) calling 'yylex' from 'yyparse' | +--> 'yylex': events 25-26 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (25) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (26) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 27-28 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (27) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(28) ...to here | <-------------+ | 'yyparse': events 29-34 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (29) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1839 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (34) use of uninitialized value '*_14' here | gl/parse-datetime.c:1839:9: warning: use of uninitialized value '*_14' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1839 | yyval = yyvsp[1-yylen]; | ^ 'parse_datetime': events 1-2 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(69) ...to here |...... | 1839 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (70) use of uninitialized value '*_14' here | gl/parse-datetime.y:616:21: warning: use of uninitialized value 'yyvsp_221->timespec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 616 | pc->seconds = $2; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 4:' branch... ->-+ | | | | |+----------------------------------------+ 1844 || { 1845 || case 4: /* timespec: '@' seconds */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:616:21: 616 | pc->seconds = $2; | ^ | | | (22) use of uninitialized value 'yyvsp_221->timespec' here gl/parse-datetime.y:616:21: warning: use of uninitialized value 'yyvsp_221->timespec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 4:' branch... ->-+ | | | | | | | |+----------------------------------------+ | 1844 || { | 1845 || case 4: /* timespec: '@' seconds */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:616:21: | 616 | pc->seconds = $2; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->timespec' here | gl/parse-datetime.y:688:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 688 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 19:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1942 || case 19: /* time: tUNUMBER tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:688:9: 688 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:688:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:688:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 19:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1942 || case 19: /* time: tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:688:9: | 688 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:688:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 19:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1942 || case 19: /* time: tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:688:9: | 688 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:688:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:688:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 19:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1942 || case 19: /* time: tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:688:9: | 688 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:689:33: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 689 | pc->meridian = $2; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 19:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1942 || case 19: /* time: tUNUMBER tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:689:33: 689 | pc->meridian = $2; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:689:33: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 19:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1942 || case 19: /* time: tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:689:33: | 689 | pc->meridian = $2; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:693:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 20:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:693:9: 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ | | | (22) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:693:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:693:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 20:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:693:9: 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:693:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:693:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (39) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:693:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:693:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:693:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:693:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:693:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:693:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:693:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (82) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:693:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:693:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:694:33: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 694 | pc->meridian = $4; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 20:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:694:33: 694 | pc->meridian = $4; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:694:33: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:694:33: | 694 | pc->meridian = $4; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 21:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:698:9: 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |264 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 21:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:698:9: 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (39) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (39) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |264 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:698:105: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 21:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:698:105: 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:698:105: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:698:105: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:698:105: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:698:105: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:698:105: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:105: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:698:105: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:698:105: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:698:134: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 21:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:698:134: 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:698:134: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:698:134: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:698:134: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:134: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:699:33: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 699 | pc->meridian = $6; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 21:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:699:33: 699 | pc->meridian = $6; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:699:33: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:699:33: | 699 | pc->meridian = $6; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:707:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 707 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 23:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1969 || case 23: /* iso_8601_time: tUNUMBER zone_offset */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:707:9: 707 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:707:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:707:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 23:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1969 || case 23: /* iso_8601_time: tUNUMBER zone_offset */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:707:9: | 707 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:707:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 23:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1969 || case 23: /* iso_8601_time: tUNUMBER zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:707:9: | 707 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:707:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:707:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 23:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1969 || case 23: /* iso_8601_time: tUNUMBER zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:707:9: | 707 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:712:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 24:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:712:9: 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ | | | (22) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:712:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:712:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 24:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:712:9: 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:712:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:712:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (39) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:712:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:712:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:712:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:712:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:712:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:712:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:712:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (82) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:712:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:712:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 25:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:717:9: 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |264 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 25:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:717:9: 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (39) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (39) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |264 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:717:105: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 25:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:717:105: 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:717:105: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:717:105: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:717:105: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:717:105: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:717:105: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:105: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:717:105: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:717:105: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:717:134: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 25:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:717:134: 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:717:134: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:717:134: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:717:134: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:134: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:731:15: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 731 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 28:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1996 || case 28: /* zone_offset: tSNUMBER o_colon_minutes */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:731:15: 731 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:731:15: warning: use of uninitialized value '_59->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 28:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1996 || case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:731:15: | 731 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (39) use of uninitialized value '_59->textintval' here | gl/parse-datetime.y:731:15: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 28:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1996 || case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:731:15: | 731 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:731:15: warning: use of uninitialized value '_59->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 28:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1996 || case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:731:15: | 731 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (82) use of uninitialized value '_59->textintval' here | gl/parse-datetime.y:754:36: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 754 | { pc->local_isdst = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 29:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2005 || case 29: /* local_zone: tLOCAL_ZONE */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:754:36: 754 | { pc->local_isdst = $1; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:754:36: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 29:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2005 || case 29: /* local_zone: tLOCAL_ZONE */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:754:36: | 754 | { pc->local_isdst = $1; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:766:34: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 766 | { pc->time_zone = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 31:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2020 || case 31: /* zone: tZONE */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:766:34: 766 | { pc->time_zone = $1; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:766:34: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 31:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2020 || case 31: /* zone: tZONE */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:766:34: | 766 | { pc->time_zone = $1; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:770:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 770 | { pc->time_zone = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 33:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2032 || case 33: /* zone: tZONE relunit_snumber */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:770:35: 770 | { pc->time_zone = $1; | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:770:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:770:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 33:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2032 || case 33: /* zone: tZONE relunit_snumber */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:770:35: | 770 | { pc->time_zone = $1; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:770:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 33:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2032 || case 33: /* zone: tZONE relunit_snumber */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:770:35: | 770 | { pc->time_zone = $1; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:770:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:770:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 33:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2032 || case 33: /* zone: tZONE relunit_snumber */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:770:35: | 770 | { pc->time_zone = $1; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:771:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 771 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 33:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2032 || case 33: /* zone: tZONE relunit_snumber */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:771:15: 771 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | ^ | | | (22) use of uninitialized value 'yyvsp_221->rel' here gl/parse-datetime.y:771:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 33:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2032 || case 33: /* zone: tZONE relunit_snumber */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:771:15: | 771 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->rel' here | gl/parse-datetime.y:776:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 776 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 34:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2041 || case 34: /* zone: 'T' relunit_snumber */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:776:15: 776 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | ^ | | | (22) use of uninitialized value 'yyvsp_221->rel' here gl/parse-datetime.y:776:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 34:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2041 || case 34: /* zone: 'T' relunit_snumber */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:776:15: | 776 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->rel' here | gl/parse-datetime.y:780:15: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 35:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:780:15: 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:780:15: warning: use of uninitialized value '_72->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 35:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:780:15: | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (39) use of uninitialized value '_72->textintval' here | gl/parse-datetime.y:780:15: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 35:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:780:15: | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:780:15: warning: use of uninitialized value '_72->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 35:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:780:15: | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (82) use of uninitialized value '_72->textintval' here | gl/parse-datetime.y:781:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 781 | if (ckd_add (&pc->time_zone, pc->time_zone, $1)) YYABORT; } | ^ 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 35:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:780:15: | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (39) calling 'time_zone_hhmm' from 'yyparse' | +--> 'time_zone_hhmm': events 40-42 | | 1234 | time_zone_hhmm (parser_control *pc, textint s, intmax_t mm) | | ^ | | | | | (40) entry to 'time_zone_hhmm' |...... | 1254 | if (overflow || ! (-24 * 60 <= n_minutes && n_minutes <= 24 * 60)) | | ~ | | | | | (41) following 'false' branch... ->-+ | | | | | | | |+---------------------------------------------------+ | 1255 || return false; | 1256 || pc->time_zone = n_minutes * 60; | || ~ | || | | |+->(42) ...to here | <------+ | 'yyparse': event 43 | | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (43) returning to 'yyparse' from 'time_zone_hhmm' | 'yyparse': events 44-46 | | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (44) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 781 || if (ckd_add (&pc->time_zone, pc->time_zone, $1)) YYABORT; } | || ~ ~ | || | | | || | (46) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | |+------->(45) ...to here | gl/parse-datetime.y:781:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 781 | if (ckd_add (&pc->time_zone, pc->time_zone, $1)) YYABORT; } | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:781:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 35:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(87) ...to here | 'yyparse': event 88 | |gl/parse-datetime.y:780:15: | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (88) calling 'time_zone_hhmm' from 'yyparse' | +--> 'time_zone_hhmm': events 89-91 | | 1234 | time_zone_hhmm (parser_control *pc, textint s, intmax_t mm) | | ^ | | | | | (89) entry to 'time_zone_hhmm' |...... | 1254 | if (overflow || ! (-24 * 60 <= n_minutes && n_minutes <= 24 * 60)) | | ~ | | | | | (90) following 'false' branch... ->-+ | | | | | | | |+---------------------------------------------------+ | 1255 || return false; | 1256 || pc->time_zone = n_minutes * 60; | || ~ | || | | |+->(91) ...to here | <------+ | 'yyparse': event 92 | | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (92) returning to 'yyparse' from 'time_zone_hhmm' | 'yyparse': events 93-95 | | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (93) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 781 || if (ckd_add (&pc->time_zone, pc->time_zone, $1)) YYABORT; } | || ~ ~ | || | | | || | (95) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | |+------->(94) ...to here | gl/parse-datetime.y:781:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 781 | if (ckd_add (&pc->time_zone, pc->time_zone, $1)) YYABORT; } | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:783:34: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 783 | { pc->time_zone = $1 + 60 * 60; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 36:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2057 || case 36: /* zone: tDAYZONE */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:783:34: 783 | { pc->time_zone = $1 + 60 * 60; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:783:34: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 36:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2057 || case 36: /* zone: tDAYZONE */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:783:34: | 783 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:785:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 785 | { pc->time_zone = $1 + 60 * 60; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 37:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2063 || case 37: /* zone: tZONE tDST */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:785:35: 785 | { pc->time_zone = $1 + 60 * 60; } | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:785:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:785:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 37:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2063 || case 37: /* zone: tZONE tDST */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:785:35: | 785 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:785:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 37:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2063 || case 37: /* zone: tZONE tDST */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:785:35: | 785 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:785:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:785:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 37:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2063 || case 37: /* zone: tZONE tDST */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:785:35: | 785 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:792:35: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 792 | pc->day_number = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 38:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2069 || case 38: /* day: tDAY */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:792:35: 792 | pc->day_number = $1; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:792:35: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 38:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2069 || case 38: /* day: tDAY */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:792:35: | 792 | pc->day_number = $1; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:797:36: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 797 | pc->day_number = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 39:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2078 || case 39: /* day: tDAY ',' */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:797:36: 797 | pc->day_number = $1; | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:797:36: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:797:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 39:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2078 || case 39: /* day: tDAY ',' */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:797:36: | 797 | pc->day_number = $1; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:797:36: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 39:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2078 || case 39: /* day: tDAY ',' */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:797:36: | 797 | pc->day_number = $1; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:797:36: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:797:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 39:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2078 || case 39: /* day: tDAY ',' */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:797:36: | 797 | pc->day_number = $1; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:801:37: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 801 | pc->day_ordinal = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 40:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2087 || case 40: /* day: tORDINAL tDAY */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:801:37: 801 | pc->day_ordinal = $1; | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:801:37: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:801:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 40:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2087 || case 40: /* day: tORDINAL tDAY */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:801:37: | 801 | pc->day_ordinal = $1; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:801:37: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 40:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2087 || case 40: /* day: tORDINAL tDAY */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:801:37: | 801 | pc->day_ordinal = $1; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:801:37: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:801:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 40:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2087 || case 40: /* day: tORDINAL tDAY */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:801:37: | 801 | pc->day_ordinal = $1; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:802:35: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 802 | pc->day_number = $2; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 40:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2087 || case 40: /* day: tORDINAL tDAY */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:802:35: 802 | pc->day_number = $2; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:802:35: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 40:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2087 || case 40: /* day: tORDINAL tDAY */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:802:35: | 802 | pc->day_number = $2; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:807:49: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 807 | pc->day_ordinal = $1.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 41:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2097 || case 41: /* day: tUNUMBER tDAY */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:807:49: 807 | pc->day_ordinal = $1.value; | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:807:49: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:807:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 41:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2097 || case 41: /* day: tUNUMBER tDAY */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:807:49: | 807 | pc->day_ordinal = $1.value; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:807:49: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 41:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2097 || case 41: /* day: tUNUMBER tDAY */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:807:49: | 807 | pc->day_ordinal = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:807:49: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:807:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 41:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2097 || case 41: /* day: tUNUMBER tDAY */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:807:49: | 807 | pc->day_ordinal = $1.value; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:808:35: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 808 | pc->day_number = $2; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 41:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2097 || case 41: /* day: tUNUMBER tDAY */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:808:35: 808 | pc->day_number = $2; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:808:35: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 41:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2097 || case 41: /* day: tUNUMBER tDAY */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:808:35: | 808 | pc->day_number = $2; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:816:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 816 | pc->month = $1.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 42:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:816:43: 816 | pc->month = $1.value; | ^ | | | (22) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:816:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:816:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:816:43: | 816 | pc->month = $1.value; | | ^ | | | | | (39) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:816:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:816:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:816:43: | 816 | pc->month = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:816:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:816:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:816:43: | 816 | pc->month = $1.value; | | ^ | | | | | (82) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:816:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:817:40: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 817 | pc->day = $3.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 42:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:817:40: 817 | pc->day = $3.value; | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval.value' here gl/parse-datetime.y:817:40: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:817:40: | 817 | pc->day = $3.value; | | ^ | | | | | (39) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:817:40: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:817:40: | 817 | pc->day = $3.value; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:817:40: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(87) ...to here | 'yyparse': event 88 | |gl/parse-datetime.y:817:40: | 817 | pc->day = $3.value; | | ^ | | | | | (88) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:826:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 826 | if (4 <= $1.digits) | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 43:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:826:40: 826 | if (4 <= $1.digits) | ^ | | | (22) out-of-bounds read from byte -208 till byte -201 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:826:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------+ |read of 'idx_t' (8 bytes)| +-------------------------+ ^ | | +-------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +-------------------------+ +-------------------------------------+ |~~~~~~~~~~~~+~~~~~~~~~~~~||~+~~||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |200 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:826:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:826:40: | 826 | if (4 <= $1.digits) | | ^ | | | | | (39) out-of-bounds read from byte -152 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:826:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------+ |read of 'idx_t' (8 bytes)| +-------------------------+ ^ | | +-------------------------+ +----------+-------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +-------------------------+ +--------------------------------------+ |~~~~~~~~~~~~+~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |144 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:826:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:826:40: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) out-of-bounds read from byte -208 till byte -201 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:826:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------+ |read of 'idx_t' (8 bytes)| +-------------------------+ ^ | | +-------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +-------------------------+ +-------------------------------------+ |~~~~~~~~~~~~+~~~~~~~~~~~~||~+~~||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |200 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:826:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:826:40: | 826 | if (4 <= $1.digits) | | ^ | | | | | (82) out-of-bounds read from byte -152 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:826:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------+ |read of 'idx_t' (8 bytes)| +-------------------------+ ^ | | +-------------------------+ +----------+-------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +-------------------------+ +--------------------------------------+ |~~~~~~~~~~~~+~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |144 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:836:22: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 836 | pc->year = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 43:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': events 22-24 gl/parse-datetime.y:826:12: 826 | if (4 <= $1.digits) | ^ | | | (22) following 'true' branch... ->-+ | | | | |+----------------------------------------------+ 827 || { 828 || if (debugging (pc)) || ~ || | |+----------->(23) ...to here ...... 836 | pc->year = $1; | ~ | | | (24) out-of-bounds read from byte -224 till byte -201 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:836:22: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 836 | pc->year = $1; | ^ +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+----+ +--------+-------+ |under-read of 24 bytes| |200 bytes| |size: 1120 bytes| +----------------------+ +---------+ +----------------+ gl/parse-datetime.y:836:22: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': events 39-41 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (39) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(40) ...to here |...... | 836 | pc->year = $1; | | ~ | | | | | (41) out-of-bounds read from byte -168 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:836:22: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 836 | pc->year = $1; | ^ +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+----+ +--------+-------+ |under-read of 24 bytes| |144 bytes| |size: 1120 bytes| +----------------------+ +---------+ +----------------+ gl/parse-datetime.y:836:22: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 836 | pc->year = $1; | | ~ | | | | | (38) out-of-bounds read from byte -224 till byte -201 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:836:22: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 836 | pc->year = $1; | ^ +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+----+ +--------+-------+ |under-read of 24 bytes| |200 bytes| |size: 1120 bytes| +----------------------+ +---------+ +----------------+ gl/parse-datetime.y:836:22: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': events 82-84 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (82) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(83) ...to here |...... | 836 | pc->year = $1; | | ~ | | | | | (84) out-of-bounds read from byte -168 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:836:22: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 836 | pc->year = $1; | ^ +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+----+ +--------+-------+ |under-read of 24 bytes| |144 bytes| |size: 1120 bytes| +----------------------+ +---------+ +----------------+ gl/parse-datetime.y:837:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 837 | pc->month = $3.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 43:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': events 22-24 gl/parse-datetime.y:826:12: 826 | if (4 <= $1.digits) | ^ | | | (22) following 'true' branch... ->-+ | | | | |+----------------------------------------------+ 827 || { 828 || if (debugging (pc)) || ~ || | |+----------->(23) ...to here ...... 837 | pc->month = $3.value; | | | | (24) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:837:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 837 | pc->month = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:837:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': events 39-41 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (39) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(40) ...to here |...... | 837 | pc->month = $3.value; | | | | | | | (41) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:837:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 837 | pc->month = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:837:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 837 | pc->month = $3.value; | | | | | | | (38) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:837:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 837 | pc->month = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:837:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': events 82-84 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (82) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(83) ...to here |...... | 837 | pc->month = $3.value; | | | | | | | (84) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:837:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 837 | pc->month = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:838:44: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 838 | pc->day = $5.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 43:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': events 22-24 gl/parse-datetime.y:826:12: 826 | if (4 <= $1.digits) | ^ | | | (22) following 'true' branch... ->-+ | | | | |+----------------------------------------------+ 827 || { 828 || if (debugging (pc)) || ~ || | |+----------->(23) ...to here ...... 838 | pc->day = $5.value; | | | | (24) use of uninitialized value 'yyvsp_221->textintval.value' here gl/parse-datetime.y:838:44: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 838 | pc->day = $5.value; | ^ 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': events 39-41 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (39) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(40) ...to here |...... | 838 | pc->day = $5.value; | | | | | | | (41) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:838:44: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 838 | pc->day = $5.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 838 | pc->day = $5.value; | | | | | | | (38) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:838:44: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 838 | pc->day = $5.value; | ^ 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(87) ...to here | 'yyparse': events 88-90 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (88) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(89) ...to here |...... | 838 | pc->day = $5.value; | | | | | | | (90) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:847:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 847 | pc->month = $1.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 43:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': events 22-24 gl/parse-datetime.y:826:12: 826 | if (4 <= $1.digits) | ^ | | | (22) following 'false' branch... ->-+ | | ...... | | |+-----------------------------------------------+ 842 || if (debugging (pc)) || ~ || | |+----------->(23) ...to here ...... 847 | pc->month = $1.value; | | | | (24) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:847:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 847 | pc->month = $1.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:847:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': events 39-41 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (39) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(40) ...to here |...... | 847 | pc->month = $1.value; | | | | | | | (41) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 847 | pc->month = $1.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:847:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 847 | pc->month = $1.value; | | | | | | | (38) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 847 | pc->month = $1.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:847:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': events 82-84 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (82) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(83) ...to here |...... | 847 | pc->month = $1.value; | | | | | | | (84) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 847 | pc->month = $1.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:848:45: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 848 | pc->day = $3.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 43:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': events 22-24 gl/parse-datetime.y:826:12: 826 | if (4 <= $1.digits) | ^ | | | (22) following 'false' branch... ->-+ | | ...... | | |+-----------------------------------------------+ 842 || if (debugging (pc)) || ~ || | |+----------->(23) ...to here ...... 848 | pc->day = $3.value; | | | | (24) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:848:45: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 848 | pc->day = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:848:45: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': events 39-41 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (39) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(40) ...to here |...... | 848 | pc->day = $3.value; | | | | | | | (41) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:848:45: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 848 | pc->day = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:848:45: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 848 | pc->day = $3.value; | | | | | | | (38) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:848:45: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 848 | pc->day = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:848:45: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': events 82-84 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (82) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(83) ...to here |...... | 848 | pc->day = $3.value; | | | | | | | (84) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:848:45: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 848 | pc->day = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:849:22: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 849 | pc->year = $5; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 43:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': events 22-24 gl/parse-datetime.y:826:12: 826 | if (4 <= $1.digits) | ^ | | | (22) following 'false' branch... ->-+ | | ...... | | |+-----------------------------------------------+ 842 || if (debugging (pc)) || ~ || | |+----------->(23) ...to here ...... 849 | pc->year = $5; | ~ | | | (24) use of uninitialized value 'yyvsp_221->textintval' here gl/parse-datetime.y:849:22: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 849 | pc->year = $5; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 849 | pc->year = $5; | | ~ | | | | | (38) use of uninitialized value 'yyvsp_221->textintval' here | gl/parse-datetime.y:855:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 855 | pc->day = $1.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 44:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:855:41: 855 | pc->day = $1.value; | ^ | | | (22) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:855:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:855:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:855:41: | 855 | pc->day = $1.value; | | ^ | | | | | (39) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:855:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:855:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:855:41: | 855 | pc->day = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:855:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:855:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:855:41: | 855 | pc->day = $1.value; | | ^ | | | | | (82) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:855:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:856:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 856 | pc->month = $3.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 44:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:856:43: 856 | pc->month = $3.value; | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:856:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:856:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:856:43: | 856 | pc->month = $3.value; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:856:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:856:43: | 856 | pc->month = $3.value; | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:856:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:856:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:856:43: | 856 | pc->month = $3.value; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:861:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 861 | pc->day = $1.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 45:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:861:41: 861 | pc->day = $1.value; | ^ | | | (22) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:861:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:861:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:861:41: | 861 | pc->day = $1.value; | | ^ | | | | | (39) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:861:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:861:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:861:41: | 861 | pc->day = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:861:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:861:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:861:41: | 861 | pc->day = $1.value; | | ^ | | | | | (82) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:861:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:862:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 862 | pc->month = $3.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 45:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:862:43: 862 | pc->month = $3.value; | ^ | | | (22) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:862:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:862:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:862:43: | 862 | pc->month = $3.value; | | ^ | | | | | (39) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:862:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:862:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:862:43: | 862 | pc->month = $3.value; | | ^ | | | | | (36) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:862:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:862:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:862:43: | 862 | pc->month = $3.value; | | ^ | | | | | (82) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:862:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:863:18: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 863 | pc->year = $5; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 45:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:863:18: 863 | pc->year = $5; | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval' here gl/parse-datetime.y:863:18: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:863:18: | 863 | pc->year = $5; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval' here | gl/parse-datetime.y:868:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 868 | pc->day = $1.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 46:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:868:41: 868 | pc->day = $1.value; | ^ | | | (22) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:868:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:868:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:868:41: | 868 | pc->day = $1.value; | | ^ | | | | | (39) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:868:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:868:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:868:41: | 868 | pc->day = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:868:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:868:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:868:41: | 868 | pc->day = $1.value; | | ^ | | | | | (82) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:868:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:869:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 869 | pc->month = $2; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 46:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:869:31: 869 | pc->month = $2; | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:869:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:869:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:869:31: | 869 | pc->month = $2; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:869:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:869:31: | 869 | pc->month = $2; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:869:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:869:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:869:31: | 869 | pc->month = $2; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:870:13: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 870 | if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 46:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:870:13: 870 | if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval.value' here gl/parse-datetime.y:870:13: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:870:13: | 870 | if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:876:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 876 | pc->month = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 47:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:876:31: 876 | pc->month = $1; | ^ | | | (22) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:876:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |104 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:876:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:876:31: | 876 | pc->month = $1; | | ^ | | | | | (39) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:876:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:876:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:876:31: | 876 | pc->month = $1; | | ^ | | | | | (36) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:876:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |104 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:876:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:876:31: | 876 | pc->month = $1; | | ^ | | | | | (82) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:876:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:877:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 47:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:877:13: 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:877:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:877:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:877:13: | 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:877:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:877:13: | 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:877:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:877:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:877:13: | 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:878:13: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 878 | if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 47:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': events 22-24 gl/parse-datetime.y:877:12: 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | ^ | | | (22) following 'false' branch... ->-+ | | | | |+-----------------------------------------------+ 878 || if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; || ~ ~ || | | || | (24) use of uninitialized value 'yyvsp_221->textintval.value' here |+------->(23) ...to here gl/parse-datetime.y:878:13: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 878 | if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:877:12: | 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | | ^ | | | | | (36) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------------+ | 878 || if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; | || ~ ~ | || | | | || | (38) use of uninitialized value 'yyvsp_221->textintval.value' here | |+------->(37) ...to here | gl/parse-datetime.y:883:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 883 | pc->month = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 48:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2198 || case 48: /* date: tMONTH tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:883:31: 883 | pc->month = $1; | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:883:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:883:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 48:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2198 || case 48: /* date: tMONTH tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:883:31: | 883 | pc->month = $1; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:883:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 48:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2198 || case 48: /* date: tMONTH tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:883:31: | 883 | pc->month = $1; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:883:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:883:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 48:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2198 || case 48: /* date: tMONTH tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:883:31: | 883 | pc->month = $1; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:884:40: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 884 | pc->day = $2.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 48:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2198 || case 48: /* date: tMONTH tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:884:40: 884 | pc->day = $2.value; | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval.value' here gl/parse-datetime.y:884:40: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 48:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2198 || case 48: /* date: tMONTH tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:884:40: | 884 | pc->day = $2.value; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:888:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 888 | pc->month = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 49:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:888:31: 888 | pc->month = $1; | ^ | | | (22) out-of-bounds read from byte -168 till byte -161 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:888:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |160 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:888:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:888:31: | 888 | pc->month = $1; | | ^ | | | | | (39) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:888:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |104 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:888:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:888:31: | 888 | pc->month = $1; | | ^ | | | | | (36) out-of-bounds read from byte -168 till byte -161 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:888:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |160 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:888:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:888:31: | 888 | pc->month = $1; | | ^ | | | | | (82) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:888:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |104 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:889:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 889 | pc->day = $2.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 49:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:889:41: 889 | pc->day = $2.value; | ^ | | | (22) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:889:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:889:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:889:41: | 889 | pc->day = $2.value; | | ^ | | | | | (39) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:889:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:889:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:889:41: | 889 | pc->day = $2.value; | | ^ | | | | | (36) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:889:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:889:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:889:41: | 889 | pc->day = $2.value; | | ^ | | | | | (82) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:889:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:890:18: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 890 | pc->year = $4; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 49:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:890:18: 890 | pc->year = $4; | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval' here gl/parse-datetime.y:890:18: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:890:18: | 890 | pc->year = $4; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval' here | gl/parse-datetime.y:894:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 894 | pc->day = $1.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 50:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2217 || case 50: /* date: tUNUMBER tMONTH */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:894:41: 894 | pc->day = $1.value; | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:894:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:894:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 50:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2217 || case 50: /* date: tUNUMBER tMONTH */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:894:41: | 894 | pc->day = $1.value; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:894:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 50:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2217 || case 50: /* date: tUNUMBER tMONTH */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:894:41: | 894 | pc->day = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:894:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:894:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 50:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2217 || case 50: /* date: tUNUMBER tMONTH */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:894:41: | 894 | pc->day = $1.value; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:895:30: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 895 | pc->month = $2; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 50:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2217 || case 50: /* date: tUNUMBER tMONTH */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:895:30: 895 | pc->month = $2; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:895:30: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 50:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2217 || case 50: /* date: tUNUMBER tMONTH */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:895:30: | 895 | pc->month = $2; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:899:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 899 | pc->day = $1.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 51:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:899:41: 899 | pc->day = $1.value; | ^ | | | (22) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:899:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:899:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:899:41: | 899 | pc->day = $1.value; | | ^ | | | | | (39) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:899:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:899:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:899:41: | 899 | pc->day = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:899:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:899:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:899:41: | 899 | pc->day = $1.value; | | ^ | | | | | (82) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:899:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:900:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 900 | pc->month = $2; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 51:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:900:31: 900 | pc->month = $2; | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:900:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:900:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:900:31: | 900 | pc->month = $2; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:900:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:900:31: | 900 | pc->month = $2; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:900:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:900:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:900:31: | 900 | pc->month = $2; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:901:18: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 901 | pc->year = $3; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 51:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:901:18: 901 | pc->year = $3; | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval' here gl/parse-datetime.y:901:18: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:901:18: | 901 | pc->year = $3; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval' here | gl/parse-datetime.y:910:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 910 | pc->year = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 53:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:910:18: 910 | pc->year = $1; | ^ | | | (22) out-of-bounds read from byte -112 till byte -89 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:910:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+---+ +--------+-------+ |under-read of 24 bytes| |88 bytes| |size: 1120 bytes| +----------------------+ +--------+ +----------------+ gl/parse-datetime.y:910:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:910:18: | 910 | pc->year = $1; | | ^ | | | | | (39) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:910:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+---+ +--------+-------+ |under-read of 24 bytes| |32 bytes| |size: 1120 bytes| +----------------------+ +--------+ +----------------+ gl/parse-datetime.y:910:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:910:18: | 910 | pc->year = $1; | | ^ | | | | | (36) out-of-bounds read from byte -112 till byte -89 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:910:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+---+ +--------+-------+ |under-read of 24 bytes| |88 bytes| |size: 1120 bytes| +----------------------+ +--------+ +----------------+ gl/parse-datetime.y:910:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:910:18: | 910 | pc->year = $1; | | ^ | | | | | (82) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:910:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+---+ +--------+-------+ |under-read of 24 bytes| |32 bytes| |size: 1120 bytes| +----------------------+ +--------+ +----------------+ gl/parse-datetime.y:911:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 53:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:911:13: 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:911:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:911:13: | 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:911:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:911:13: | 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:911:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:911:13: | 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:912:13: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 912 | if (ckd_sub (&pc->day, 0, $3.value)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 53:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': events 22-24 gl/parse-datetime.y:911:12: 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | ^ | | | (22) following 'false' branch... ->-+ | | | | |+-----------------------------------------------+ 912 || if (ckd_sub (&pc->day, 0, $3.value)) YYABORT; || ~ ~ || | | || | (24) use of uninitialized value 'yyvsp_221->textintval.value' here |+------->(23) ...to here gl/parse-datetime.y:912:13: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 912 | if (ckd_sub (&pc->day, 0, $3.value)) YYABORT; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:911:12: | 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | | ^ | | | | | (36) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------------+ | 912 || if (ckd_sub (&pc->day, 0, $3.value)) YYABORT; | || ~ ~ | || | | | || | (38) use of uninitialized value 'yyvsp_221->textintval.value' here | |+------->(37) ...to here | gl/parse-datetime.y:918:15: warning: use of uninitialized value '_136->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 918 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | ^ 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 54:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2247 || case 54: /* rel: relunit tAGO */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:918:15: | 918 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (39) use of uninitialized value '_136->rel' here | gl/parse-datetime.y:918:15: warning: use of uninitialized value '_136->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 54:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2247 || case 54: /* rel: relunit tAGO */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:918:15: | 918 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (82) use of uninitialized value '_136->rel' here | gl/parse-datetime.y:918:66: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 918 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 54:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2247 || case 54: /* rel: relunit tAGO */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:918:66: 918 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:918:66: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 54:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2247 || case 54: /* rel: relunit tAGO */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:918:66: | 918 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:920:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 920 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 55:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2253 || case 55: /* rel: relunit */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:920:15: 920 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->rel' here gl/parse-datetime.y:920:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 55:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2253 || case 55: /* rel: relunit */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:920:15: | 920 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->rel' here | gl/parse-datetime.y:922:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 922 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 56:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2259 || case 56: /* rel: dayshift */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:922:15: 922 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->rel' here gl/parse-datetime.y:922:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 56:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2259 || case 56: /* rel: dayshift */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:922:15: | 922 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->rel' here | gl/parse-datetime.y:927:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 927 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 57:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2265 || case 57: /* relunit: tORDINAL tYEAR_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:927:69: 927 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:927:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:927:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 57:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2265 || case 57: /* relunit: tORDINAL tYEAR_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:927:69: | 927 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:927:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 57:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2265 || case 57: /* relunit: tORDINAL tYEAR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:927:69: | 927 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:927:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:927:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 57:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2265 || case 57: /* relunit: tORDINAL tYEAR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:927:69: | 927 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:929:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 929 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 58:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2271 || case 58: /* relunit: tUNUMBER tYEAR_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:929:81: 929 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:929:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:929:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 58:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2271 || case 58: /* relunit: tUNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:929:81: | 929 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:929:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 58:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2271 || case 58: /* relunit: tUNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:929:81: | 929 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:929:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:929:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 58:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2271 || case 58: /* relunit: tUNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:929:81: | 929 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:933:70: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 933 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 60:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2283 || case 60: /* relunit: tORDINAL tMONTH_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:933:70: 933 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:933:70: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:933:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 60:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2283 || case 60: /* relunit: tORDINAL tMONTH_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:933:70: | 933 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:933:70: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 60:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2283 || case 60: /* relunit: tORDINAL tMONTH_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:933:70: | 933 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:933:70: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:933:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 60:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2283 || case 60: /* relunit: tORDINAL tMONTH_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:933:70: | 933 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:935:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 935 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 61:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2289 || case 61: /* relunit: tUNUMBER tMONTH_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:935:82: 935 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:935:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:935:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 61:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2289 || case 61: /* relunit: tUNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:935:82: | 935 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:935:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 61:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2289 || case 61: /* relunit: tUNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:935:82: | 935 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:935:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:935:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 61:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2289 || case 61: /* relunit: tUNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:935:82: | 935 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:940:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 63:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2301 || case 63: /* relunit: tORDINAL tDAY_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:940:13: 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:940:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:940:13: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 63:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2301 || case 63: /* relunit: tORDINAL tDAY_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:940:13: 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:940:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 63:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2301 || case 63: /* relunit: tORDINAL tDAY_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:940:13: | 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:940:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 63:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2301 || case 63: /* relunit: tORDINAL tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:940:13: | 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:940:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:940:13: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 63:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2301 || case 63: /* relunit: tORDINAL tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:940:13: | 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:940:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 63:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2301 || case 63: /* relunit: tORDINAL tDAY_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:940:13: | 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:943:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 64:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2308 || case 64: /* relunit: tUNUMBER tDAY_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:943:13: 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:943:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:943:13: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 64:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2308 || case 64: /* relunit: tUNUMBER tDAY_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:943:13: 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:943:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 64:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2308 || case 64: /* relunit: tUNUMBER tDAY_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:943:13: | 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:943:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 64:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2308 || case 64: /* relunit: tUNUMBER tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:943:13: | 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:943:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:943:13: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 64:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2308 || case 64: /* relunit: tUNUMBER tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:943:13: | 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:943:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 64:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2308 || case 64: /* relunit: tUNUMBER tDAY_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:943:13: | 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:945:67: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 945 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 65:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2315 || case 65: /* relunit: tDAY_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:945:67: 945 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:945:67: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 65:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2315 || case 65: /* relunit: tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:945:67: | 945 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:947:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 947 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 66:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2321 || case 66: /* relunit: tORDINAL tHOUR_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:947:69: 947 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:947:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:947:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 66:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2321 || case 66: /* relunit: tORDINAL tHOUR_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:947:69: | 947 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:947:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 66:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2321 || case 66: /* relunit: tORDINAL tHOUR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:947:69: | 947 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:947:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:947:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 66:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2321 || case 66: /* relunit: tORDINAL tHOUR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:947:69: | 947 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:949:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 949 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 67:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2327 || case 67: /* relunit: tUNUMBER tHOUR_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:949:81: 949 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:949:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:949:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 67:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2327 || case 67: /* relunit: tUNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:949:81: | 949 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:949:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 67:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2327 || case 67: /* relunit: tUNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:949:81: | 949 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:949:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:949:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 67:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2327 || case 67: /* relunit: tUNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:949:81: | 949 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:953:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 69:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2339 || case 69: /* relunit: tORDINAL tMINUTE_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:953:72: 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:953:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:953:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 69:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2339 || case 69: /* relunit: tORDINAL tMINUTE_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:953:72: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:953:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 69:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2339 || case 69: /* relunit: tORDINAL tMINUTE_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:953:72: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:953:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:953:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 69:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2339 || case 69: /* relunit: tORDINAL tMINUTE_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:953:72: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:955:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 955 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 70:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2345 || case 70: /* relunit: tUNUMBER tMINUTE_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:955:84: 955 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:955:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 70:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2345 || case 70: /* relunit: tUNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:955:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 70:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2345 || case 70: /* relunit: tUNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:955:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 70:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2345 || case 70: /* relunit: tUNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:959:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 959 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 72:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2357 || case 72: /* relunit: tORDINAL tSEC_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:959:72: 959 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:959:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:959:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 72:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2357 || case 72: /* relunit: tORDINAL tSEC_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:959:72: | 959 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:959:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 72:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2357 || case 72: /* relunit: tORDINAL tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:959:72: | 959 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:959:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:959:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 72:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2357 || case 72: /* relunit: tORDINAL tSEC_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:959:72: | 959 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:961:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 961 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 73:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2363 || case 73: /* relunit: tUNUMBER tSEC_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:961:84: 961 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:961:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:961:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 73:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2363 || case 73: /* relunit: tUNUMBER tSEC_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:961:84: | 961 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:961:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 73:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2363 || case 73: /* relunit: tUNUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:961:84: | 961 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:961:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:961:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 73:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2363 || case 73: /* relunit: tUNUMBER tSEC_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:961:84: | 961 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:963:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 74:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2369 || case 74: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:963:82: 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:963:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:963:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 74:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2369 || case 74: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:963:82: | 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:963:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 74:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2369 || case 74: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:963:82: | 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:963:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:963:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 74:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2369 || case 74: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:963:82: | 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:963:128: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 74:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2369 || case 74: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:963:128: 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:963:128: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:963:128: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 74:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2369 || case 74: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:963:128: | 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:963:128: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:965:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 75:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2375 || case 75: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:965:82: 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:965:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:965:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 75:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2375 || case 75: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:965:82: | 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:965:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 75:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2375 || case 75: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:965:82: | 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:965:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:965:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 75:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2375 || case 75: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:965:82: | 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:965:128: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 75:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2375 || case 75: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:965:128: 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:965:128: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:965:128: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 75:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2375 || case 75: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:965:128: | 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:965:128: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:973:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 973 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 78:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2387 || case 78: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:973:81: 973 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:973:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:973:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 78:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2387 || case 78: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:973:81: | 973 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:973:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 78:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2387 || case 78: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:973:81: | 973 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:973:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:973:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 78:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2387 || case 78: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:973:81: | 973 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:975:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 975 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 79:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2393 || case 79: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:975:82: 975 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:975:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:975:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 79:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2393 || case 79: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:975:82: | 975 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:975:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 79:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2393 || case 79: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:975:82: | 975 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:975:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:975:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 79:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2393 || case 79: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:975:82: | 975 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:978:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 80:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2399 || case 80: /* relunit_snumber: tSNUMBER tDAY_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:978:13: 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:978:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:978:13: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 80:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2399 || case 80: /* relunit_snumber: tSNUMBER tDAY_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:978:13: 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:978:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 80:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2399 || case 80: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:978:13: | 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:978:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 80:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2399 || case 80: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:978:13: | 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:978:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:978:13: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 80:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2399 || case 80: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:978:13: | 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:978:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 80:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2399 || case 80: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:978:13: | 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:980:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 980 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 81:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2406 || case 81: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:980:81: 980 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:980:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:980:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 81:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2406 || case 81: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:980:81: | 980 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:980:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 81:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2406 || case 81: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:980:81: | 980 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:980:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:980:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 81:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2406 || case 81: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:980:81: | 980 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:982:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 982 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 82:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2412 || case 82: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:982:84: 982 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:982:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:982:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 82:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2412 || case 82: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:982:84: | 982 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:982:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 82:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2412 || case 82: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:982:84: | 982 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:982:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:982:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 82:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2412 || case 82: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:982:84: | 982 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:984:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 984 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 83:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2418 || case 83: /* relunit_snumber: tSNUMBER tSEC_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:984:84: 984 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:984:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:984:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 83:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2418 || case 83: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:984:84: | 984 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:984:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 83:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2418 || case 83: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:984:84: | 984 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:984:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:984:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 83:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2418 || case 83: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:984:84: | 984 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:989:67: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 989 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 84:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2424 || case 84: /* dayshift: tDAY_SHIFT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:989:67: 989 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:989:67: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 84:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2424 || case 84: /* dayshift: tDAY_SHIFT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:989:67: | 989 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:998:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 998 | $$ = (struct timespec) { .tv_sec = $1.value }; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 88:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2430 || case 88: /* signed_seconds: tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:998:79: 998 | $$ = (struct timespec) { .tv_sec = $1.value }; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval.value' here gl/parse-datetime.y:998:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 88:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2430 || case 88: /* signed_seconds: tSNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:998:79: | 998 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (39) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:998:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 88:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2430 || case 88: /* signed_seconds: tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:998:79: | 998 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:998:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 88:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2430 || case 88: /* signed_seconds: tSNUMBER */ | || ~ | || | | |+->(87) ...to here | 'yyparse': event 88 | |gl/parse-datetime.y:998:79: | 998 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (88) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1005:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1005 | $$ = (struct timespec) { .tv_sec = $1.value }; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 90:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2437 || case 90: /* unsigned_seconds: tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:1005:79: 1005 | $$ = (struct timespec) { .tv_sec = $1.value }; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval.value' here gl/parse-datetime.y:1005:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 90:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2437 || case 90: /* unsigned_seconds: tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:1005:79: | 1005 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (39) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1005:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 90:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2437 || case 90: /* unsigned_seconds: tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:1005:79: | 1005 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1005:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 90:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2437 || case 90: /* unsigned_seconds: tUNUMBER */ | || ~ | || | | |+->(87) ...to here | 'yyparse': event 88 | |gl/parse-datetime.y:1005:79: | 1005 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (88) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1010:9: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1010 | { digits_to_date_time (pc, $1); } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 91:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2444 || case 91: /* number: tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:1010:9: 1010 | { digits_to_date_time (pc, $1); } | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval' here gl/parse-datetime.y:1010:9: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 91:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2444 || case 91: /* number: tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:1010:9: | 1010 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval' here | gl/parse-datetime.y:1018:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 1018 | digits_to_date_time (pc, $1); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 92:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2450 || case 92: /* hybrid: tUNUMBER relunit_snumber */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:1018:9: 1018 | digits_to_date_time (pc, $1); | ^ | | | (22) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:1018:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+---+ +--------+-------+ |under-read of 24 bytes| |32 bytes| |size: 1120 bytes| +----------------------+ +--------+ +----------------+ gl/parse-datetime.y:1018:9: warning: use of uninitialized value '_180->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 92:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2450 || case 92: /* hybrid: tUNUMBER relunit_snumber */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:1018:9: | 1018 | digits_to_date_time (pc, $1); | | ^ | | | | | (39) use of uninitialized value '_180->textintval' here | gl/parse-datetime.y:1018:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 92:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2450 || case 92: /* hybrid: tUNUMBER relunit_snumber */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:1018:9: | 1018 | digits_to_date_time (pc, $1); | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:1018:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+---+ +--------+-------+ |under-read of 24 bytes| |32 bytes| |size: 1120 bytes| +----------------------+ +--------+ +----------------+ gl/parse-datetime.y:1018:9: warning: use of uninitialized value '_180->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 92:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2450 || case 92: /* hybrid: tUNUMBER relunit_snumber */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:1018:9: | 1018 | digits_to_date_time (pc, $1); | | ^ | | | | | (82) use of uninitialized value '_180->textintval' here | gl/parse-datetime.y:1027:47: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1027 | { $$ = $2.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 94:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2467 || case 94: /* o_colon_minutes: ':' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:1027:47: 1027 | { $$ = $2.value; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval.value' here gl/parse-datetime.y:1027:47: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 94:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2467 || case 94: /* o_colon_minutes: ':' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:1027:47: | 1027 | { $$ = $2.value; } | | ^ | | | | | (39) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1027:47: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 94:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2467 || case 94: /* o_colon_minutes: ':' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:1027:47: | 1027 | { $$ = $2.value; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1027:47: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 94:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2467 || case 94: /* o_colon_minutes: ':' tUNUMBER */ | || ~ | || | | |+->(87) ...to here | 'yyparse': event 88 | |gl/parse-datetime.y:1027:47: | 1027 | { $$ = $2.value; } | | ^ | | | | | (88) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.c:2601:12: warning: use of uninitialized value 'yylval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 2601 | *++yyvsp = yylval; | ^ 'yyparse': events 1-4 | | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1601 | YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); | | ~ | | | | | (2) region created on stack here | | (3) capacity: 56 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | | 'yyparse': events 5-12 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(5) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (6) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(7) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (8) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (10) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(9) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(11) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (12) calling 'yylex' from 'yyparse' | +--> 'yylex': events 13-14 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (13) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (14) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 15-16 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (15) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(16) ...to here | <-------------+ | 'yyparse': events 17-20 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (17) returning to 'yyparse' from 'yylex' |...... | 1819 | if (yyn == 0) | | ~ | | | | | (18) following 'true' branch (when 'yyn_250 == 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1820 || goto yyerrlab; | || ~ | || | | |+--->(19) ...to here |...... | 2518 | if (!yyerrstatus) | | ~ | | | | | (20) following 'true' branch (when 'yyerrstatus_214 == 0')... ->-+ | | | | 'yyparse': events 21-28 | | | | | |+----------------------------------------------------------------------+ | 2518 || if (!yyerrstatus) | || ^ | || | | |+---->(21) ...to here |...... | 2577 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (22) following 'true' branch (when 'yyn_397 != -93')... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 2578 || { | 2579 || yyn += YYSYMBOL_YYerror; | || ~ | || | | |+--------->(23) ...to here | 2580 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+------------------------------------------------+ | 2581 || { | 2582 || yyn = yytable[yyn]; | || ~ | || | | |+------------->(25) ...to here | 2583 | if (0 < yyn) | | ~ | | | | | (26) following 'true' branch (when 'yyn_399 > 0')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 2601 || *++yyvsp = yylval; | || ~ ~ | || | | | || | (28) use of uninitialized value 'yylval' here | |+->(27) ...to here | gl/parse-datetime.c:2601:12: warning: use of uninitialized value 'yylval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 2601 | *++yyvsp = yylval; | ^ 'parse_datetime_body': events 1-6 | |gl/parse-datetime.y:1767:1: | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-17 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1601 | YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); | | ~ | | | | | (15) region created on stack here | | (16) capacity: 56 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (17) following 'false' branch... ->-+ | | | | 'yyparse': events 18-25 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(18) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (19) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(20) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (21) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (23) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(22) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(24) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (25) calling 'yylex' from 'yyparse' | +--> 'yylex': events 26-27 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (26) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (27) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 28-29 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (28) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(29) ...to here | <-------------+ | 'yyparse': events 30-33 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (30) returning to 'yyparse' from 'yylex' |...... | 1819 | if (yyn == 0) | | ~ | | | | | (31) following 'true' branch (when 'yyn_250 == 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1820 || goto yyerrlab; | || ~ | || | | |+--->(32) ...to here |...... | 2518 | if (!yyerrstatus) | | ~ | | | | | (33) following 'true' branch (when 'yyerrstatus_214 == 0')... ->-+ | | | | 'yyparse': events 34-41 | | | | | |+----------------------------------------------------------------------+ | 2518 || if (!yyerrstatus) | || ^ | || | | |+---->(34) ...to here |...... | 2577 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (35) following 'true' branch (when 'yyn_397 != -93')... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 2578 || { | 2579 || yyn += YYSYMBOL_YYerror; | || ~ | || | | |+--------->(36) ...to here | 2580 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (37) following 'true' branch... ->-+ | | | | | | | |+------------------------------------------------+ | 2581 || { | 2582 || yyn = yytable[yyn]; | || ~ | || | | |+------------->(38) ...to here | 2583 | if (0 < yyn) | | ~ | | | | | (39) following 'true' branch (when 'yyn_399 > 0')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 2601 || *++yyvsp = yylval; | || ~ ~ | || | | | || | (41) use of uninitialized value 'yylval' here | |+->(40) ...to here | gl/parse-datetime.y: In function 'digits_to_date_time': gl/parse-datetime.y:273:1: warning: use of uninitialized value 'text_int.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 273 | digits_to_date_time (parser_control *pc, textint text_int) | ^ 'yyparse': events 1-2 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | | 'yyparse': events 3-10 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(3) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(5) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(7) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(9) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (10) calling 'yylex' from 'yyparse' | +--> 'yylex': events 11-12 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (11) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (12) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 13-16 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (13) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (14) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (16) following 'true' branch (when the strings are equal)... ->-+ | |+--->(15) ...to here | | | | | 'lookup_word': event 17 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(17) ...to here | <------+ | 'yylex': events 18-20 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (18) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (19) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(20) ...to here | <------+ | 'yyparse': events 21-26 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (21) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (22) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(23) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(25) ...to here | | | | | 'yyparse': events 27-28 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (28) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(27) ...to here | 'yyparse': events 29-37 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(29) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (30) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(31) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (32) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(33) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (34) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(35) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (36) following 'case 91:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2444 || case 91: /* number: tUNUMBER */ | || ~ | || | | |+->(37) ...to here | 'yyparse': event 38 | |gl/parse-datetime.y:1010:9: | 1010 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (38) calling 'digits_to_date_time' from 'yyparse' | +--> 'digits_to_date_time': events 39-41 | | 273 | digits_to_date_time (parser_control *pc, textint text_int) | | ^ ~ | | | | | | (39) entry to 'digits_to_date_time' (40) region created on stack here | | (41) use of uninitialized value 'text_int.value' here | gl/parse-datetime.y:273:1: warning: use of uninitialized value 'text_int.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-51 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (51) following 'false' branch... ->-+ | | | | 'yyparse': events 52-59 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(52) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (53) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(54) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (55) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (57) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(56) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(58) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (59) calling 'yylex' from 'yyparse' | +--> 'yylex': events 60-61 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (60) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (61) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 62-65 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (62) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (63) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (65) following 'true' branch (when the strings are equal)... ->-+ | |+--->(64) ...to here | | | | | 'lookup_word': event 66 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(66) ...to here | <------+ | 'yylex': events 67-69 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (67) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (68) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(69) ...to here | <------+ | 'yyparse': events 70-75 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (70) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (71) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(72) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (73) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (75) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(74) ...to here | | | | | 'yyparse': events 76-77 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (77) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(76) ...to here | 'yyparse': events 78-86 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(78) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (79) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(80) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (81) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(82) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(84) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (85) following 'case 91:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2444 || case 91: /* number: tUNUMBER */ | || ~ | || | | |+->(86) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:1010:9: | 1010 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (87) calling 'digits_to_date_time' from 'yyparse' | +--> 'digits_to_date_time': events 88-90 | | 273 | digits_to_date_time (parser_control *pc, textint text_int) | | ^ ~ | | | | | | (88) entry to 'digits_to_date_time' (89) region created on stack here | | (90) use of uninitialized value 'text_int.value' here | gl/parse-datetime.y: In function 'apply_relative_time': gl/parse-datetime.y:313:1: warning: use of uninitialized value 'rel.month' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 313 | apply_relative_time (parser_control *pc, relative_time rel, int factor) | ^ 'yyparse': events 1-2 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | | 'yyparse': events 3-10 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(3) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(5) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(7) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(9) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (10) calling 'yylex' from 'yyparse' | +--> 'yylex': events 11-12 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (11) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (12) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 13-16 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (13) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (14) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (16) following 'true' branch (when the strings are equal)... ->-+ | |+--->(15) ...to here | | | | | 'lookup_word': event 17 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(17) ...to here | <------+ | 'yylex': events 18-20 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (18) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (19) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(20) ...to here | <------+ | 'yyparse': events 21-26 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (21) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (22) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(23) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(25) ...to here | | | | | 'yyparse': events 27-28 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (28) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(27) ...to here | 'yyparse': events 29-37 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(29) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (30) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(31) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (32) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(33) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (34) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(35) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (36) following 'case 55:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2253 || case 55: /* rel: relunit */ | || ~ | || | | |+->(37) ...to here | 'yyparse': event 38 | |gl/parse-datetime.y:920:15: | 920 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (38) calling 'apply_relative_time' from 'yyparse' | +--> 'apply_relative_time': events 39-41 | | 313 | apply_relative_time (parser_control *pc, relative_time rel, int factor) | | ^ ~ | | | | | | (39) entry to 'apply_relative_time' (40) region created on stack here | | (41) use of uninitialized value 'rel.month' here | gl/parse-datetime.y:313:1: warning: use of uninitialized value 'rel.month' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-51 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (51) following 'false' branch... ->-+ | | | | 'yyparse': events 52-59 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(52) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (53) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(54) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (55) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (57) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(56) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(58) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (59) calling 'yylex' from 'yyparse' | +--> 'yylex': events 60-61 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (60) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (61) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 62-65 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (62) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (63) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (65) following 'true' branch (when the strings are equal)... ->-+ | |+--->(64) ...to here | | | | | 'lookup_word': event 66 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(66) ...to here | <------+ | 'yylex': events 67-69 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (67) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (68) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(69) ...to here | <------+ | 'yyparse': events 70-75 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (70) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (71) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(72) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (73) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (75) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(74) ...to here | | | | | 'yyparse': events 76-77 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (77) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(76) ...to here | 'yyparse': events 78-86 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(78) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (79) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(80) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (81) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(82) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(84) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (85) following 'case 55:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2253 || case 55: /* rel: relunit */ | || ~ | || | | |+->(86) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:920:15: | 920 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (87) calling 'apply_relative_time' from 'yyparse' | +--> 'apply_relative_time': events 88-90 | | 313 | apply_relative_time (parser_control *pc, relative_time rel, int factor) | | ^ ~ | | | | | | (88) entry to 'apply_relative_time' (89) region created on stack here | | (90) use of uninitialized value 'rel.month' here | gl/read-file.c: In function '_gnutls_fread_file': gl/read-file.c:198:13: warning: leak of FILE 'fopen (filename_11(D), mode_4)' [CWE-775] [-Wanalyzer-file-leak] 198 | if (flags & RF_SENSITIVE) | ^ '_gnutls_read_file': events 1-6 | | 190 | read_file (const char *filename, int flags, size_t *length) | | ^ | | | | | (1) entry to '_gnutls_read_file' |...... | 193 | FILE *stream = fopen (filename, mode); | | ~ | | | | | (2) opened here | 194 | | 195 | if (!stream) | | ~ | | | | | (3) assuming 'fopen (filename_11(D), mode_4)' is non-NULL | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 198 || if (flags & RF_SENSITIVE) | || ~ | || | | |+->(5) ...to here |...... | 201 | char *out = fread_file (stream, flags, length); | | ~ | | | | | (6) calling '_gnutls_fread_file' from '_gnutls_read_file' | +--> '_gnutls_fread_file': events 7-10 | | 52 | fread_file (FILE *stream, int flags, size_t *length) | | ^ | | | | | (7) entry to '_gnutls_fread_file' |...... | 61 | if (fstat (fileno (stream), &st) >= 0 && S_ISREG (st.st_mode)) | | ~ | | | | | (8) following 'true' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 62 || { | 63 || off_t pos = ftello (stream); | || ~ ~ | || | | | || | (10) if 'ftello' throws an exception... | |+------->(9) ...to here | '_gnutls_read_file': event 11 | | 198 | if (flags & RF_SENSITIVE) | | ^ | | | | | (11) 'fopen (filename_11(D), mode_4)' leaks here; was opened at (2) | gl/parse-datetime.c: In function 'yyparse': gl/parse-datetime.c:1806:12: warning: use of uninitialized value 'yylval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1806 | *++yyvsp = yylval; | ^ 'yyparse': events 1-4 | | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1601 | YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); | | ~ | | | | | (2) region created on stack here | | (3) capacity: 56 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | | 'yyparse': events 5-12 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(5) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (6) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(7) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (8) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (10) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(9) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(11) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (12) calling 'yylex' from 'yyparse' | +--> 'yylex': events 13-14 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (13) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (14) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 15-16 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (15) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(16) ...to here | <-------------+ | 'yyparse': events 17-22 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (17) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (18) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(19) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (20) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (22) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(21) ...to here | | | | | 'yyparse': events 23-24 | | | | | |+-----------------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(23) ...to here |...... | 1806 | *++yyvsp = yylval; | | ~ | | | | | (24) use of uninitialized value 'yylval' here | gl/parse-datetime.c:1806:12: warning: use of uninitialized value 'yylval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1806 | *++yyvsp = yylval; | ^ 'parse_datetime_body': events 1-6 | |gl/parse-datetime.y:1767:1: | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-17 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1601 | YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); | | ~ | | | | | (15) region created on stack here | | (16) capacity: 56 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (17) following 'false' branch... ->-+ | | | | 'yyparse': events 18-25 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(18) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (19) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(20) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (21) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (23) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(22) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(24) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (25) calling 'yylex' from 'yyparse' | +--> 'yylex': events 26-27 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (26) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (27) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 28-29 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (28) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(29) ...to here | <-------------+ | 'yyparse': events 30-35 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (30) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (31) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(32) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (33) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (35) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(34) ...to here | | | | | 'yyparse': events 36-37 | | | | | |+-----------------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(36) ...to here |...... | 1806 | *++yyvsp = yylval; | | ~ | | | | | (37) use of uninitialized value 'yylval' here | gl/parse-datetime.c:1839:9: warning: use of uninitialized value '*_14' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1839 | yyval = yyvsp[1-yylen]; | ^ 'yyparse': events 1-2 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-8 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1819 | if (yyn == 0) | ~ | | | (6) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1820 || goto yyerrlab; 1821 || goto yyreduce; || ~ || | |+->(7) ...to here ...... 1839 | yyval = yyvsp[1-yylen]; | ~ | | | (8) use of uninitialized value '*_14' here gl/parse-datetime.c:1839:9: warning: use of uninitialized value '*_14' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1839 | yyval = yyvsp[1-yylen]; | ^ 'yyparse': events 1-3 | | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (13) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 14-15 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (14) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(15) ...to here | <-------------+ | 'yyparse': events 16-21 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (16) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (17) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(18) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (19) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(20) ...to here |...... | 1839 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (21) use of uninitialized value '*_14' here | gl/parse-datetime.c:1839:9: warning: use of uninitialized value '*_14' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1839 | yyval = yyvsp[1-yylen]; | ^ 'parse_datetime_body': events 1-6 | |gl/parse-datetime.y:1767:1: | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-22 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (20) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(21) ...to here |...... | 1839 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (22) use of uninitialized value '*_14' here | gl/parse-datetime.c:1839:9: warning: use of uninitialized value '*_14' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1839 | yyval = yyvsp[1-yylen]; | ^ 'parse_datetime_body': events 1-6 | |gl/parse-datetime.y:1767:1: | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-24 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (24) calling 'yylex' from 'yyparse' | +--> 'yylex': events 25-26 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (25) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (26) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 27-28 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (27) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(28) ...to here | <-------------+ | 'yyparse': events 29-34 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (29) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1839 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (34) use of uninitialized value '*_14' here | gl/parse-datetime.c:1839:9: warning: use of uninitialized value '*_14' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1839 | yyval = yyvsp[1-yylen]; | ^ 'parse_datetime': events 1-2 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(69) ...to here |...... | 1839 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (70) use of uninitialized value '*_14' here | gl/parse-datetime.y:616:21: warning: use of uninitialized value 'yyvsp_221->timespec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 616 | pc->seconds = $2; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 4:' branch... ->-+ | | | | |+----------------------------------------+ 1844 || { 1845 || case 4: /* timespec: '@' seconds */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:616:21: 616 | pc->seconds = $2; | ^ | | | (22) use of uninitialized value 'yyvsp_221->timespec' here gl/parse-datetime.y:616:21: warning: use of uninitialized value 'yyvsp_221->timespec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 4:' branch... ->-+ | | | | | | | |+----------------------------------------+ | 1844 || { | 1845 || case 4: /* timespec: '@' seconds */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:616:21: | 616 | pc->seconds = $2; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->timespec' here | gl/parse-datetime.y:688:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 688 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 19:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1942 || case 19: /* time: tUNUMBER tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:688:9: 688 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:688:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:688:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 19:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1942 || case 19: /* time: tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:688:9: | 688 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:688:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 19:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1942 || case 19: /* time: tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:688:9: | 688 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:688:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:688:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 19:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1942 || case 19: /* time: tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:688:9: | 688 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:689:33: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 689 | pc->meridian = $2; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 19:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1942 || case 19: /* time: tUNUMBER tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:689:33: 689 | pc->meridian = $2; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:689:33: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 19:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1942 || case 19: /* time: tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:689:33: | 689 | pc->meridian = $2; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:693:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 20:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:693:9: 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ | | | (22) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:693:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:693:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 20:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:693:9: 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:693:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:693:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (39) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:693:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:693:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:693:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:693:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:693:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:693:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:693:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (82) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:693:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:693:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:694:33: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 694 | pc->meridian = $4; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 20:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:694:33: 694 | pc->meridian = $4; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:694:33: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:694:33: | 694 | pc->meridian = $4; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 21:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:698:9: 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |264 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 21:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:698:9: 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (39) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (39) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |264 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:698:105: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 21:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:698:105: 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:698:105: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:698:105: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:698:105: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:698:105: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:698:105: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:105: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:698:105: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:698:105: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:698:134: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 21:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:698:134: 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:698:134: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:698:134: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:698:134: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:134: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:699:33: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 699 | pc->meridian = $6; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 21:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:699:33: 699 | pc->meridian = $6; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:699:33: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:699:33: | 699 | pc->meridian = $6; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:707:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 707 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 23:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1969 || case 23: /* iso_8601_time: tUNUMBER zone_offset */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:707:9: 707 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:707:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:707:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 23:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1969 || case 23: /* iso_8601_time: tUNUMBER zone_offset */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:707:9: | 707 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:707:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 23:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1969 || case 23: /* iso_8601_time: tUNUMBER zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:707:9: | 707 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:707:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:707:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 23:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1969 || case 23: /* iso_8601_time: tUNUMBER zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:707:9: | 707 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:712:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 24:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:712:9: 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ | | | (22) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:712:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:712:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 24:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:712:9: 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:712:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:712:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (39) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:712:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:712:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:712:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:712:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:712:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:712:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:712:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (82) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:712:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:712:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 25:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:717:9: 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |264 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 25:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:717:9: 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (39) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (39) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |264 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:717:105: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 25:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:717:105: 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:717:105: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:717:105: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:717:105: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:717:105: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:717:105: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:105: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:717:105: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:717:105: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:717:134: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 25:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:717:134: 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:717:134: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:717:134: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:717:134: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:134: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:731:15: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 731 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 28:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1996 || case 28: /* zone_offset: tSNUMBER o_colon_minutes */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:731:15: 731 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:731:15: warning: use of uninitialized value '_59->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 28:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1996 || case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:731:15: | 731 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (39) use of uninitialized value '_59->textintval' here | gl/parse-datetime.y:731:15: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 28:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1996 || case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:731:15: | 731 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:731:15: warning: use of uninitialized value '_59->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 28:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1996 || case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:731:15: | 731 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (82) use of uninitialized value '_59->textintval' here | gl/parse-datetime.y:754:36: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 754 | { pc->local_isdst = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 29:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2005 || case 29: /* local_zone: tLOCAL_ZONE */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:754:36: 754 | { pc->local_isdst = $1; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:754:36: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 29:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2005 || case 29: /* local_zone: tLOCAL_ZONE */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:754:36: | 754 | { pc->local_isdst = $1; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:766:34: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 766 | { pc->time_zone = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 31:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2020 || case 31: /* zone: tZONE */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:766:34: 766 | { pc->time_zone = $1; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:766:34: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 31:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2020 || case 31: /* zone: tZONE */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:766:34: | 766 | { pc->time_zone = $1; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:770:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 770 | { pc->time_zone = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 33:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2032 || case 33: /* zone: tZONE relunit_snumber */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:770:35: 770 | { pc->time_zone = $1; | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:770:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:770:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 33:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2032 || case 33: /* zone: tZONE relunit_snumber */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:770:35: | 770 | { pc->time_zone = $1; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:770:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 33:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2032 || case 33: /* zone: tZONE relunit_snumber */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:770:35: | 770 | { pc->time_zone = $1; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:770:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:770:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 33:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2032 || case 33: /* zone: tZONE relunit_snumber */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:770:35: | 770 | { pc->time_zone = $1; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:771:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 771 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 33:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2032 || case 33: /* zone: tZONE relunit_snumber */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:771:15: 771 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | ^ | | | (22) use of uninitialized value 'yyvsp_221->rel' here gl/parse-datetime.y:771:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 33:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2032 || case 33: /* zone: tZONE relunit_snumber */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:771:15: | 771 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->rel' here | gl/parse-datetime.y:776:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 776 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 34:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2041 || case 34: /* zone: 'T' relunit_snumber */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:776:15: 776 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | ^ | | | (22) use of uninitialized value 'yyvsp_221->rel' here gl/parse-datetime.y:776:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 34:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2041 || case 34: /* zone: 'T' relunit_snumber */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:776:15: | 776 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->rel' here | gl/parse-datetime.y:780:15: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 35:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:780:15: 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:780:15: warning: use of uninitialized value '_72->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 35:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:780:15: | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (39) use of uninitialized value '_72->textintval' here | gl/parse-datetime.y:780:15: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 35:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:780:15: | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:780:15: warning: use of uninitialized value '_72->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 35:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:780:15: | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (82) use of uninitialized value '_72->textintval' here | gl/parse-datetime.y:781:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 781 | if (ckd_add (&pc->time_zone, pc->time_zone, $1)) YYABORT; } | ^ 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 35:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:780:15: | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (39) calling 'time_zone_hhmm' from 'yyparse' | +--> 'time_zone_hhmm': events 40-42 | | 1234 | time_zone_hhmm (parser_control *pc, textint s, intmax_t mm) | | ^ | | | | | (40) entry to 'time_zone_hhmm' |...... | 1254 | if (overflow || ! (-24 * 60 <= n_minutes && n_minutes <= 24 * 60)) | | ~ | | | | | (41) following 'false' branch... ->-+ | | | | | | | |+---------------------------------------------------+ | 1255 || return false; | 1256 || pc->time_zone = n_minutes * 60; | || ~ | || | | |+->(42) ...to here | <------+ | 'yyparse': event 43 | | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (43) returning to 'yyparse' from 'time_zone_hhmm' | 'yyparse': events 44-46 | | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (44) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 781 || if (ckd_add (&pc->time_zone, pc->time_zone, $1)) YYABORT; } | || ~ ~ | || | | | || | (46) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | |+------->(45) ...to here | gl/parse-datetime.y:781:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 781 | if (ckd_add (&pc->time_zone, pc->time_zone, $1)) YYABORT; } | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:781:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 35:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(87) ...to here | 'yyparse': event 88 | |gl/parse-datetime.y:780:15: | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (88) calling 'time_zone_hhmm' from 'yyparse' | +--> 'time_zone_hhmm': events 89-91 | | 1234 | time_zone_hhmm (parser_control *pc, textint s, intmax_t mm) | | ^ | | | | | (89) entry to 'time_zone_hhmm' |...... | 1254 | if (overflow || ! (-24 * 60 <= n_minutes && n_minutes <= 24 * 60)) | | ~ | | | | | (90) following 'false' branch... ->-+ | | | | | | | |+---------------------------------------------------+ | 1255 || return false; | 1256 || pc->time_zone = n_minutes * 60; | || ~ | || | | |+->(91) ...to here | <------+ | 'yyparse': event 92 | | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (92) returning to 'yyparse' from 'time_zone_hhmm' | 'yyparse': events 93-95 | | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (93) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 781 || if (ckd_add (&pc->time_zone, pc->time_zone, $1)) YYABORT; } | || ~ ~ | || | | | || | (95) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | |+------->(94) ...to here | gl/parse-datetime.y:781:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 781 | if (ckd_add (&pc->time_zone, pc->time_zone, $1)) YYABORT; } | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:783:34: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 783 | { pc->time_zone = $1 + 60 * 60; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 36:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2057 || case 36: /* zone: tDAYZONE */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:783:34: 783 | { pc->time_zone = $1 + 60 * 60; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:783:34: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 36:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2057 || case 36: /* zone: tDAYZONE */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:783:34: | 783 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:785:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 785 | { pc->time_zone = $1 + 60 * 60; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 37:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2063 || case 37: /* zone: tZONE tDST */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:785:35: 785 | { pc->time_zone = $1 + 60 * 60; } | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:785:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:785:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 37:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2063 || case 37: /* zone: tZONE tDST */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:785:35: | 785 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:785:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 37:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2063 || case 37: /* zone: tZONE tDST */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:785:35: | 785 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:785:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:785:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 37:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2063 || case 37: /* zone: tZONE tDST */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:785:35: | 785 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:792:35: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 792 | pc->day_number = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 38:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2069 || case 38: /* day: tDAY */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:792:35: 792 | pc->day_number = $1; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:792:35: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 38:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2069 || case 38: /* day: tDAY */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:792:35: | 792 | pc->day_number = $1; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:797:36: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 797 | pc->day_number = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 39:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2078 || case 39: /* day: tDAY ',' */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:797:36: 797 | pc->day_number = $1; | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:797:36: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:797:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 39:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2078 || case 39: /* day: tDAY ',' */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:797:36: | 797 | pc->day_number = $1; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:797:36: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 39:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2078 || case 39: /* day: tDAY ',' */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:797:36: | 797 | pc->day_number = $1; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:797:36: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:797:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 39:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2078 || case 39: /* day: tDAY ',' */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:797:36: | 797 | pc->day_number = $1; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:801:37: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 801 | pc->day_ordinal = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 40:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2087 || case 40: /* day: tORDINAL tDAY */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:801:37: 801 | pc->day_ordinal = $1; | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:801:37: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:801:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 40:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2087 || case 40: /* day: tORDINAL tDAY */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:801:37: | 801 | pc->day_ordinal = $1; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:801:37: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 40:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2087 || case 40: /* day: tORDINAL tDAY */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:801:37: | 801 | pc->day_ordinal = $1; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:801:37: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:801:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 40:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2087 || case 40: /* day: tORDINAL tDAY */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:801:37: | 801 | pc->day_ordinal = $1; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:802:35: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 802 | pc->day_number = $2; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 40:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2087 || case 40: /* day: tORDINAL tDAY */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:802:35: 802 | pc->day_number = $2; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:802:35: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 40:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2087 || case 40: /* day: tORDINAL tDAY */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:802:35: | 802 | pc->day_number = $2; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:807:49: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 807 | pc->day_ordinal = $1.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 41:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2097 || case 41: /* day: tUNUMBER tDAY */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:807:49: 807 | pc->day_ordinal = $1.value; | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:807:49: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:807:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 41:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2097 || case 41: /* day: tUNUMBER tDAY */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:807:49: | 807 | pc->day_ordinal = $1.value; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:807:49: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 41:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2097 || case 41: /* day: tUNUMBER tDAY */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:807:49: | 807 | pc->day_ordinal = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:807:49: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:807:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 41:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2097 || case 41: /* day: tUNUMBER tDAY */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:807:49: | 807 | pc->day_ordinal = $1.value; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:808:35: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 808 | pc->day_number = $2; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 41:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2097 || case 41: /* day: tUNUMBER tDAY */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:808:35: 808 | pc->day_number = $2; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:808:35: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 41:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2097 || case 41: /* day: tUNUMBER tDAY */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:808:35: | 808 | pc->day_number = $2; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:816:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 816 | pc->month = $1.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 42:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:816:43: 816 | pc->month = $1.value; | ^ | | | (22) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:816:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:816:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:816:43: | 816 | pc->month = $1.value; | | ^ | | | | | (39) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:816:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:816:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:816:43: | 816 | pc->month = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:816:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:816:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:816:43: | 816 | pc->month = $1.value; | | ^ | | | | | (82) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:816:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:817:40: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 817 | pc->day = $3.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 42:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:817:40: 817 | pc->day = $3.value; | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval.value' here gl/parse-datetime.y:817:40: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:817:40: | 817 | pc->day = $3.value; | | ^ | | | | | (39) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:817:40: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:817:40: | 817 | pc->day = $3.value; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:817:40: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(87) ...to here | 'yyparse': event 88 | |gl/parse-datetime.y:817:40: | 817 | pc->day = $3.value; | | ^ | | | | | (88) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:826:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 826 | if (4 <= $1.digits) | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 43:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:826:40: 826 | if (4 <= $1.digits) | ^ | | | (22) out-of-bounds read from byte -208 till byte -201 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:826:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------+ |read of 'idx_t' (8 bytes)| +-------------------------+ ^ | | +-------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +-------------------------+ +-------------------------------------+ |~~~~~~~~~~~~+~~~~~~~~~~~~||~+~~||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |200 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:826:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:826:40: | 826 | if (4 <= $1.digits) | | ^ | | | | | (39) out-of-bounds read from byte -152 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:826:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------+ |read of 'idx_t' (8 bytes)| +-------------------------+ ^ | | +-------------------------+ +----------+-------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +-------------------------+ +--------------------------------------+ |~~~~~~~~~~~~+~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |144 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:826:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:826:40: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) out-of-bounds read from byte -208 till byte -201 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:826:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------+ |read of 'idx_t' (8 bytes)| +-------------------------+ ^ | | +-------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +-------------------------+ +-------------------------------------+ |~~~~~~~~~~~~+~~~~~~~~~~~~||~+~~||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |200 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:826:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:826:40: | 826 | if (4 <= $1.digits) | | ^ | | | | | (82) out-of-bounds read from byte -152 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:826:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------+ |read of 'idx_t' (8 bytes)| +-------------------------+ ^ | | +-------------------------+ +----------+-------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +-------------------------+ +--------------------------------------+ |~~~~~~~~~~~~+~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |144 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:836:22: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 836 | pc->year = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 43:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': events 22-24 gl/parse-datetime.y:826:12: 826 | if (4 <= $1.digits) | ^ | | | (22) following 'true' branch... ->-+ | | | | |+----------------------------------------------+ 827 || { 828 || if (debugging (pc)) || ~ || | |+----------->(23) ...to here ...... 836 | pc->year = $1; | ~ | | | (24) out-of-bounds read from byte -224 till byte -201 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:836:22: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 836 | pc->year = $1; | ^ +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+----+ +--------+-------+ |under-read of 24 bytes| |200 bytes| |size: 1120 bytes| +----------------------+ +---------+ +----------------+ gl/parse-datetime.y:836:22: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': events 39-41 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (39) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(40) ...to here |...... | 836 | pc->year = $1; | | ~ | | | | | (41) out-of-bounds read from byte -168 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:836:22: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 836 | pc->year = $1; | ^ +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+----+ +--------+-------+ |under-read of 24 bytes| |144 bytes| |size: 1120 bytes| +----------------------+ +---------+ +----------------+ gl/parse-datetime.y:836:22: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 836 | pc->year = $1; | | ~ | | | | | (38) out-of-bounds read from byte -224 till byte -201 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:836:22: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 836 | pc->year = $1; | ^ +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+----+ +--------+-------+ |under-read of 24 bytes| |200 bytes| |size: 1120 bytes| +----------------------+ +---------+ +----------------+ gl/parse-datetime.y:836:22: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': events 82-84 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (82) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(83) ...to here |...... | 836 | pc->year = $1; | | ~ | | | | | (84) out-of-bounds read from byte -168 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:836:22: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 836 | pc->year = $1; | ^ +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+----+ +--------+-------+ |under-read of 24 bytes| |144 bytes| |size: 1120 bytes| +----------------------+ +---------+ +----------------+ gl/parse-datetime.y:837:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 837 | pc->month = $3.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 43:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': events 22-24 gl/parse-datetime.y:826:12: 826 | if (4 <= $1.digits) | ^ | | | (22) following 'true' branch... ->-+ | | | | |+----------------------------------------------+ 827 || { 828 || if (debugging (pc)) || ~ || | |+----------->(23) ...to here ...... 837 | pc->month = $3.value; | | | | (24) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:837:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 837 | pc->month = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:837:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': events 39-41 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (39) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(40) ...to here |...... | 837 | pc->month = $3.value; | | | | | | | (41) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:837:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 837 | pc->month = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:837:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 837 | pc->month = $3.value; | | | | | | | (38) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:837:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 837 | pc->month = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:837:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': events 82-84 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (82) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(83) ...to here |...... | 837 | pc->month = $3.value; | | | | | | | (84) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:837:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 837 | pc->month = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:838:44: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 838 | pc->day = $5.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 43:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': events 22-24 gl/parse-datetime.y:826:12: 826 | if (4 <= $1.digits) | ^ | | | (22) following 'true' branch... ->-+ | | | | |+----------------------------------------------+ 827 || { 828 || if (debugging (pc)) || ~ || | |+----------->(23) ...to here ...... 838 | pc->day = $5.value; | | | | (24) use of uninitialized value 'yyvsp_221->textintval.value' here gl/parse-datetime.y:838:44: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 838 | pc->day = $5.value; | ^ 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': events 39-41 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (39) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(40) ...to here |...... | 838 | pc->day = $5.value; | | | | | | | (41) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:838:44: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 838 | pc->day = $5.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 838 | pc->day = $5.value; | | | | | | | (38) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:838:44: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 838 | pc->day = $5.value; | ^ 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(87) ...to here | 'yyparse': events 88-90 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (88) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(89) ...to here |...... | 838 | pc->day = $5.value; | | | | | | | (90) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:847:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 847 | pc->month = $1.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 43:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': events 22-24 gl/parse-datetime.y:826:12: 826 | if (4 <= $1.digits) | ^ | | | (22) following 'false' branch... ->-+ | | ...... | | |+-----------------------------------------------+ 842 || if (debugging (pc)) || ~ || | |+----------->(23) ...to here ...... 847 | pc->month = $1.value; | | | | (24) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:847:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 847 | pc->month = $1.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:847:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': events 39-41 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (39) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(40) ...to here |...... | 847 | pc->month = $1.value; | | | | | | | (41) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 847 | pc->month = $1.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:847:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 847 | pc->month = $1.value; | | | | | | | (38) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 847 | pc->month = $1.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:847:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': events 82-84 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (82) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(83) ...to here |...... | 847 | pc->month = $1.value; | | | | | | | (84) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 847 | pc->month = $1.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:848:45: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 848 | pc->day = $3.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 43:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': events 22-24 gl/parse-datetime.y:826:12: 826 | if (4 <= $1.digits) | ^ | | | (22) following 'false' branch... ->-+ | | ...... | | |+-----------------------------------------------+ 842 || if (debugging (pc)) || ~ || | |+----------->(23) ...to here ...... 848 | pc->day = $3.value; | | | | (24) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:848:45: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 848 | pc->day = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:848:45: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': events 39-41 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (39) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(40) ...to here |...... | 848 | pc->day = $3.value; | | | | | | | (41) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:848:45: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 848 | pc->day = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:848:45: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 848 | pc->day = $3.value; | | | | | | | (38) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:848:45: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 848 | pc->day = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:848:45: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': events 82-84 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (82) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(83) ...to here |...... | 848 | pc->day = $3.value; | | | | | | | (84) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:848:45: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 848 | pc->day = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:849:22: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 849 | pc->year = $5; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 43:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': events 22-24 gl/parse-datetime.y:826:12: 826 | if (4 <= $1.digits) | ^ | | | (22) following 'false' branch... ->-+ | | ...... | | |+-----------------------------------------------+ 842 || if (debugging (pc)) || ~ || | |+----------->(23) ...to here ...... 849 | pc->year = $5; | ~ | | | (24) use of uninitialized value 'yyvsp_221->textintval' here gl/parse-datetime.y:849:22: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 849 | pc->year = $5; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 849 | pc->year = $5; | | ~ | | | | | (38) use of uninitialized value 'yyvsp_221->textintval' here | gl/parse-datetime.y:855:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 855 | pc->day = $1.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 44:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:855:41: 855 | pc->day = $1.value; | ^ | | | (22) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:855:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:855:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:855:41: | 855 | pc->day = $1.value; | | ^ | | | | | (39) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:855:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:855:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:855:41: | 855 | pc->day = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:855:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:855:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:855:41: | 855 | pc->day = $1.value; | | ^ | | | | | (82) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:855:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:856:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 856 | pc->month = $3.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 44:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:856:43: 856 | pc->month = $3.value; | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:856:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:856:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:856:43: | 856 | pc->month = $3.value; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:856:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:856:43: | 856 | pc->month = $3.value; | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:856:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:856:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:856:43: | 856 | pc->month = $3.value; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:861:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 861 | pc->day = $1.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 45:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:861:41: 861 | pc->day = $1.value; | ^ | | | (22) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:861:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:861:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:861:41: | 861 | pc->day = $1.value; | | ^ | | | | | (39) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:861:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:861:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:861:41: | 861 | pc->day = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:861:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:861:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:861:41: | 861 | pc->day = $1.value; | | ^ | | | | | (82) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:861:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:862:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 862 | pc->month = $3.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 45:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:862:43: 862 | pc->month = $3.value; | ^ | | | (22) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:862:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:862:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:862:43: | 862 | pc->month = $3.value; | | ^ | | | | | (39) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:862:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:862:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:862:43: | 862 | pc->month = $3.value; | | ^ | | | | | (36) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:862:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:862:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:862:43: | 862 | pc->month = $3.value; | | ^ | | | | | (82) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:862:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:863:18: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 863 | pc->year = $5; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 45:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:863:18: 863 | pc->year = $5; | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval' here gl/parse-datetime.y:863:18: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:863:18: | 863 | pc->year = $5; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval' here | gl/parse-datetime.y:868:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 868 | pc->day = $1.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 46:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:868:41: 868 | pc->day = $1.value; | ^ | | | (22) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:868:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:868:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:868:41: | 868 | pc->day = $1.value; | | ^ | | | | | (39) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:868:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:868:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:868:41: | 868 | pc->day = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:868:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:868:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:868:41: | 868 | pc->day = $1.value; | | ^ | | | | | (82) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:868:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:869:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 869 | pc->month = $2; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 46:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:869:31: 869 | pc->month = $2; | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:869:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:869:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:869:31: | 869 | pc->month = $2; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:869:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:869:31: | 869 | pc->month = $2; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:869:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:869:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:869:31: | 869 | pc->month = $2; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:870:13: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 870 | if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 46:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:870:13: 870 | if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval.value' here gl/parse-datetime.y:870:13: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:870:13: | 870 | if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:876:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 876 | pc->month = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 47:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:876:31: 876 | pc->month = $1; | ^ | | | (22) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:876:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |104 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:876:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:876:31: | 876 | pc->month = $1; | | ^ | | | | | (39) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:876:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:876:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:876:31: | 876 | pc->month = $1; | | ^ | | | | | (36) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:876:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |104 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:876:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:876:31: | 876 | pc->month = $1; | | ^ | | | | | (82) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:876:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:877:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 47:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:877:13: 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:877:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:877:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:877:13: | 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:877:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:877:13: | 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:877:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:877:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:877:13: | 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:878:13: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 878 | if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 47:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': events 22-24 gl/parse-datetime.y:877:12: 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | ^ | | | (22) following 'false' branch... ->-+ | | | | |+-----------------------------------------------+ 878 || if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; || ~ ~ || | | || | (24) use of uninitialized value 'yyvsp_221->textintval.value' here |+------->(23) ...to here gl/parse-datetime.y:878:13: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 878 | if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:877:12: | 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | | ^ | | | | | (36) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------------+ | 878 || if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; | || ~ ~ | || | | | || | (38) use of uninitialized value 'yyvsp_221->textintval.value' here | |+------->(37) ...to here | gl/parse-datetime.y:883:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 883 | pc->month = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 48:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2198 || case 48: /* date: tMONTH tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:883:31: 883 | pc->month = $1; | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:883:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:883:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 48:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2198 || case 48: /* date: tMONTH tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:883:31: | 883 | pc->month = $1; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:883:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 48:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2198 || case 48: /* date: tMONTH tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:883:31: | 883 | pc->month = $1; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:883:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:883:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 48:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2198 || case 48: /* date: tMONTH tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:883:31: | 883 | pc->month = $1; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:884:40: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 884 | pc->day = $2.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 48:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2198 || case 48: /* date: tMONTH tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:884:40: 884 | pc->day = $2.value; | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval.value' here gl/parse-datetime.y:884:40: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 48:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2198 || case 48: /* date: tMONTH tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:884:40: | 884 | pc->day = $2.value; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:888:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 888 | pc->month = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 49:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:888:31: 888 | pc->month = $1; | ^ | | | (22) out-of-bounds read from byte -168 till byte -161 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:888:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |160 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:888:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:888:31: | 888 | pc->month = $1; | | ^ | | | | | (39) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:888:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |104 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:888:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:888:31: | 888 | pc->month = $1; | | ^ | | | | | (36) out-of-bounds read from byte -168 till byte -161 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:888:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |160 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:888:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:888:31: | 888 | pc->month = $1; | | ^ | | | | | (82) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:888:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |104 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:889:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 889 | pc->day = $2.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 49:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:889:41: 889 | pc->day = $2.value; | ^ | | | (22) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:889:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:889:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:889:41: | 889 | pc->day = $2.value; | | ^ | | | | | (39) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:889:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:889:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:889:41: | 889 | pc->day = $2.value; | | ^ | | | | | (36) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:889:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:889:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:889:41: | 889 | pc->day = $2.value; | | ^ | | | | | (82) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:889:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:890:18: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 890 | pc->year = $4; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 49:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:890:18: 890 | pc->year = $4; | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval' here gl/parse-datetime.y:890:18: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:890:18: | 890 | pc->year = $4; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval' here | gl/parse-datetime.y:894:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 894 | pc->day = $1.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 50:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2217 || case 50: /* date: tUNUMBER tMONTH */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:894:41: 894 | pc->day = $1.value; | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:894:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:894:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 50:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2217 || case 50: /* date: tUNUMBER tMONTH */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:894:41: | 894 | pc->day = $1.value; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:894:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 50:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2217 || case 50: /* date: tUNUMBER tMONTH */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:894:41: | 894 | pc->day = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:894:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:894:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 50:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2217 || case 50: /* date: tUNUMBER tMONTH */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:894:41: | 894 | pc->day = $1.value; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:895:30: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 895 | pc->month = $2; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 50:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2217 || case 50: /* date: tUNUMBER tMONTH */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:895:30: 895 | pc->month = $2; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:895:30: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 50:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2217 || case 50: /* date: tUNUMBER tMONTH */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:895:30: | 895 | pc->month = $2; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:899:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 899 | pc->day = $1.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 51:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:899:41: 899 | pc->day = $1.value; | ^ | | | (22) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:899:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:899:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:899:41: | 899 | pc->day = $1.value; | | ^ | | | | | (39) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:899:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:899:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:899:41: | 899 | pc->day = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:899:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:899:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:899:41: | 899 | pc->day = $1.value; | | ^ | | | | | (82) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:899:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:900:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 900 | pc->month = $2; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 51:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:900:31: 900 | pc->month = $2; | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:900:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:900:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:900:31: | 900 | pc->month = $2; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:900:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:900:31: | 900 | pc->month = $2; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:900:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:900:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:900:31: | 900 | pc->month = $2; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:901:18: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 901 | pc->year = $3; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 51:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:901:18: 901 | pc->year = $3; | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval' here gl/parse-datetime.y:901:18: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:901:18: | 901 | pc->year = $3; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval' here | gl/parse-datetime.y:910:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 910 | pc->year = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 53:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:910:18: 910 | pc->year = $1; | ^ | | | (22) out-of-bounds read from byte -112 till byte -89 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:910:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+---+ +--------+-------+ |under-read of 24 bytes| |88 bytes| |size: 1120 bytes| +----------------------+ +--------+ +----------------+ gl/parse-datetime.y:910:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:910:18: | 910 | pc->year = $1; | | ^ | | | | | (39) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:910:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+---+ +--------+-------+ |under-read of 24 bytes| |32 bytes| |size: 1120 bytes| +----------------------+ +--------+ +----------------+ gl/parse-datetime.y:910:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:910:18: | 910 | pc->year = $1; | | ^ | | | | | (36) out-of-bounds read from byte -112 till byte -89 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:910:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+---+ +--------+-------+ |under-read of 24 bytes| |88 bytes| |size: 1120 bytes| +----------------------+ +--------+ +----------------+ gl/parse-datetime.y:910:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:910:18: | 910 | pc->year = $1; | | ^ | | | | | (82) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:910:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+---+ +--------+-------+ |under-read of 24 bytes| |32 bytes| |size: 1120 bytes| +----------------------+ +--------+ +----------------+ gl/parse-datetime.y:911:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 53:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:911:13: 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:911:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:911:13: | 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:911:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:911:13: | 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:911:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:911:13: | 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:912:13: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 912 | if (ckd_sub (&pc->day, 0, $3.value)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 53:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': events 22-24 gl/parse-datetime.y:911:12: 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | ^ | | | (22) following 'false' branch... ->-+ | | | | |+-----------------------------------------------+ 912 || if (ckd_sub (&pc->day, 0, $3.value)) YYABORT; || ~ ~ || | | || | (24) use of uninitialized value 'yyvsp_221->textintval.value' here |+------->(23) ...to here gl/parse-datetime.y:912:13: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 912 | if (ckd_sub (&pc->day, 0, $3.value)) YYABORT; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:911:12: | 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | | ^ | | | | | (36) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------------+ | 912 || if (ckd_sub (&pc->day, 0, $3.value)) YYABORT; | || ~ ~ | || | | | || | (38) use of uninitialized value 'yyvsp_221->textintval.value' here | |+------->(37) ...to here | gl/parse-datetime.y:918:15: warning: use of uninitialized value '_136->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 918 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | ^ 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 54:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2247 || case 54: /* rel: relunit tAGO */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:918:15: | 918 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (39) use of uninitialized value '_136->rel' here | gl/parse-datetime.y:918:15: warning: use of uninitialized value '_136->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 54:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2247 || case 54: /* rel: relunit tAGO */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:918:15: | 918 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (82) use of uninitialized value '_136->rel' here | gl/parse-datetime.y:918:66: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 918 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 54:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2247 || case 54: /* rel: relunit tAGO */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:918:66: 918 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:918:66: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 54:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2247 || case 54: /* rel: relunit tAGO */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:918:66: | 918 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:920:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 920 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 55:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2253 || case 55: /* rel: relunit */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:920:15: 920 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->rel' here gl/parse-datetime.y:920:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 55:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2253 || case 55: /* rel: relunit */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:920:15: | 920 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->rel' here | gl/parse-datetime.y:922:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 922 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 56:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2259 || case 56: /* rel: dayshift */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:922:15: 922 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->rel' here gl/parse-datetime.y:922:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 56:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2259 || case 56: /* rel: dayshift */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:922:15: | 922 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->rel' here | gl/parse-datetime.y:927:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 927 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 57:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2265 || case 57: /* relunit: tORDINAL tYEAR_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:927:69: 927 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:927:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:927:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 57:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2265 || case 57: /* relunit: tORDINAL tYEAR_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:927:69: | 927 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:927:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 57:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2265 || case 57: /* relunit: tORDINAL tYEAR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:927:69: | 927 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:927:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:927:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 57:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2265 || case 57: /* relunit: tORDINAL tYEAR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:927:69: | 927 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:929:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 929 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 58:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2271 || case 58: /* relunit: tUNUMBER tYEAR_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:929:81: 929 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:929:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:929:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 58:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2271 || case 58: /* relunit: tUNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:929:81: | 929 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:929:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 58:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2271 || case 58: /* relunit: tUNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:929:81: | 929 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:929:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:929:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 58:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2271 || case 58: /* relunit: tUNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:929:81: | 929 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:933:70: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 933 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 60:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2283 || case 60: /* relunit: tORDINAL tMONTH_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:933:70: 933 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:933:70: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:933:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 60:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2283 || case 60: /* relunit: tORDINAL tMONTH_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:933:70: | 933 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:933:70: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 60:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2283 || case 60: /* relunit: tORDINAL tMONTH_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:933:70: | 933 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:933:70: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:933:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 60:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2283 || case 60: /* relunit: tORDINAL tMONTH_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:933:70: | 933 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:935:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 935 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 61:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2289 || case 61: /* relunit: tUNUMBER tMONTH_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:935:82: 935 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:935:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:935:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 61:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2289 || case 61: /* relunit: tUNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:935:82: | 935 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:935:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 61:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2289 || case 61: /* relunit: tUNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:935:82: | 935 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:935:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:935:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 61:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2289 || case 61: /* relunit: tUNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:935:82: | 935 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:940:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 63:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2301 || case 63: /* relunit: tORDINAL tDAY_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:940:13: 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:940:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:940:13: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 63:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2301 || case 63: /* relunit: tORDINAL tDAY_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:940:13: 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:940:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 63:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2301 || case 63: /* relunit: tORDINAL tDAY_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:940:13: | 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:940:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 63:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2301 || case 63: /* relunit: tORDINAL tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:940:13: | 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:940:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:940:13: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 63:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2301 || case 63: /* relunit: tORDINAL tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:940:13: | 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:940:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 63:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2301 || case 63: /* relunit: tORDINAL tDAY_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:940:13: | 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:943:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 64:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2308 || case 64: /* relunit: tUNUMBER tDAY_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:943:13: 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:943:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:943:13: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 64:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2308 || case 64: /* relunit: tUNUMBER tDAY_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:943:13: 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:943:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 64:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2308 || case 64: /* relunit: tUNUMBER tDAY_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:943:13: | 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:943:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 64:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2308 || case 64: /* relunit: tUNUMBER tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:943:13: | 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:943:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:943:13: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 64:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2308 || case 64: /* relunit: tUNUMBER tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:943:13: | 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:943:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 64:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2308 || case 64: /* relunit: tUNUMBER tDAY_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:943:13: | 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:945:67: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 945 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 65:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2315 || case 65: /* relunit: tDAY_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:945:67: 945 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:945:67: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 65:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2315 || case 65: /* relunit: tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:945:67: | 945 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:947:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 947 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 66:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2321 || case 66: /* relunit: tORDINAL tHOUR_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:947:69: 947 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:947:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:947:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 66:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2321 || case 66: /* relunit: tORDINAL tHOUR_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:947:69: | 947 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:947:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 66:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2321 || case 66: /* relunit: tORDINAL tHOUR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:947:69: | 947 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:947:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:947:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 66:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2321 || case 66: /* relunit: tORDINAL tHOUR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:947:69: | 947 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:949:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 949 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 67:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2327 || case 67: /* relunit: tUNUMBER tHOUR_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:949:81: 949 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:949:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:949:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 67:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2327 || case 67: /* relunit: tUNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:949:81: | 949 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:949:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 67:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2327 || case 67: /* relunit: tUNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:949:81: | 949 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:949:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:949:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 67:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2327 || case 67: /* relunit: tUNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:949:81: | 949 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:953:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 69:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2339 || case 69: /* relunit: tORDINAL tMINUTE_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:953:72: 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:953:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:953:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 69:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2339 || case 69: /* relunit: tORDINAL tMINUTE_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:953:72: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:953:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 69:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2339 || case 69: /* relunit: tORDINAL tMINUTE_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:953:72: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:953:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:953:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 69:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2339 || case 69: /* relunit: tORDINAL tMINUTE_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:953:72: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:955:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 955 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 70:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2345 || case 70: /* relunit: tUNUMBER tMINUTE_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:955:84: 955 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:955:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 70:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2345 || case 70: /* relunit: tUNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:955:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 70:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2345 || case 70: /* relunit: tUNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:955:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 70:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2345 || case 70: /* relunit: tUNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:959:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 959 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 72:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2357 || case 72: /* relunit: tORDINAL tSEC_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:959:72: 959 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:959:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:959:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 72:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2357 || case 72: /* relunit: tORDINAL tSEC_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:959:72: | 959 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:959:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 72:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2357 || case 72: /* relunit: tORDINAL tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:959:72: | 959 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:959:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:959:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 72:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2357 || case 72: /* relunit: tORDINAL tSEC_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:959:72: | 959 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:961:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 961 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 73:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2363 || case 73: /* relunit: tUNUMBER tSEC_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:961:84: 961 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:961:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:961:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 73:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2363 || case 73: /* relunit: tUNUMBER tSEC_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:961:84: | 961 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:961:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 73:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2363 || case 73: /* relunit: tUNUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:961:84: | 961 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:961:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:961:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 73:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2363 || case 73: /* relunit: tUNUMBER tSEC_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:961:84: | 961 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:963:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 74:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2369 || case 74: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:963:82: 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:963:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:963:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 74:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2369 || case 74: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:963:82: | 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:963:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 74:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2369 || case 74: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:963:82: | 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:963:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:963:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 74:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2369 || case 74: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:963:82: | 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:963:128: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 74:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2369 || case 74: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:963:128: 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:963:128: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:963:128: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 74:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2369 || case 74: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:963:128: | 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:963:128: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:965:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 75:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2375 || case 75: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:965:82: 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:965:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:965:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 75:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2375 || case 75: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:965:82: | 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:965:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 75:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2375 || case 75: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:965:82: | 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:965:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:965:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 75:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2375 || case 75: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:965:82: | 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:965:128: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 75:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2375 || case 75: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:965:128: 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:965:128: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:965:128: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 75:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2375 || case 75: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:965:128: | 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:965:128: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:973:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 973 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 78:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2387 || case 78: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:973:81: 973 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:973:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:973:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 78:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2387 || case 78: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:973:81: | 973 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:973:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 78:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2387 || case 78: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:973:81: | 973 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:973:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:973:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 78:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2387 || case 78: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:973:81: | 973 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:975:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 975 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 79:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2393 || case 79: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:975:82: 975 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:975:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:975:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 79:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2393 || case 79: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:975:82: | 975 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:975:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 79:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2393 || case 79: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:975:82: | 975 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:975:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:975:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 79:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2393 || case 79: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:975:82: | 975 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:978:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 80:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2399 || case 80: /* relunit_snumber: tSNUMBER tDAY_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:978:13: 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:978:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:978:13: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 80:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2399 || case 80: /* relunit_snumber: tSNUMBER tDAY_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:978:13: 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:978:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 80:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2399 || case 80: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:978:13: | 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:978:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 80:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2399 || case 80: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:978:13: | 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:978:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:978:13: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 80:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2399 || case 80: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:978:13: | 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:978:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 80:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2399 || case 80: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:978:13: | 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:980:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 980 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 81:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2406 || case 81: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:980:81: 980 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:980:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:980:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 81:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2406 || case 81: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:980:81: | 980 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:980:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 81:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2406 || case 81: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:980:81: | 980 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:980:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:980:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 81:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2406 || case 81: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:980:81: | 980 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:982:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 982 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 82:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2412 || case 82: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:982:84: 982 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:982:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:982:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 82:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2412 || case 82: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:982:84: | 982 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:982:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 82:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2412 || case 82: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:982:84: | 982 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:982:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:982:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 82:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2412 || case 82: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:982:84: | 982 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:984:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 984 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 83:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2418 || case 83: /* relunit_snumber: tSNUMBER tSEC_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:984:84: 984 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:984:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:984:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 83:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2418 || case 83: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:984:84: | 984 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:984:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 83:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2418 || case 83: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:984:84: | 984 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:984:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:984:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 83:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2418 || case 83: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:984:84: | 984 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:989:67: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 989 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 84:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2424 || case 84: /* dayshift: tDAY_SHIFT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:989:67: 989 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:989:67: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 84:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2424 || case 84: /* dayshift: tDAY_SHIFT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:989:67: | 989 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:998:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 998 | $$ = (struct timespec) { .tv_sec = $1.value }; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 88:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2430 || case 88: /* signed_seconds: tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:998:79: 998 | $$ = (struct timespec) { .tv_sec = $1.value }; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval.value' here gl/parse-datetime.y:998:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 88:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2430 || case 88: /* signed_seconds: tSNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:998:79: | 998 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (39) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:998:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 88:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2430 || case 88: /* signed_seconds: tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:998:79: | 998 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:998:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 88:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2430 || case 88: /* signed_seconds: tSNUMBER */ | || ~ | || | | |+->(87) ...to here | 'yyparse': event 88 | |gl/parse-datetime.y:998:79: | 998 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (88) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1005:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1005 | $$ = (struct timespec) { .tv_sec = $1.value }; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 90:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2437 || case 90: /* unsigned_seconds: tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:1005:79: 1005 | $$ = (struct timespec) { .tv_sec = $1.value }; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval.value' here gl/parse-datetime.y:1005:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 90:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2437 || case 90: /* unsigned_seconds: tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:1005:79: | 1005 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (39) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1005:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 90:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2437 || case 90: /* unsigned_seconds: tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:1005:79: | 1005 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1005:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 90:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2437 || case 90: /* unsigned_seconds: tUNUMBER */ | || ~ | || | | |+->(87) ...to here | 'yyparse': event 88 | |gl/parse-datetime.y:1005:79: | 1005 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (88) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1010:9: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1010 | { digits_to_date_time (pc, $1); } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 91:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2444 || case 91: /* number: tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:1010:9: 1010 | { digits_to_date_time (pc, $1); } | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval' here gl/parse-datetime.y:1010:9: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 91:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2444 || case 91: /* number: tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:1010:9: | 1010 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval' here | gl/parse-datetime.y:1018:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 1018 | digits_to_date_time (pc, $1); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 92:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2450 || case 92: /* hybrid: tUNUMBER relunit_snumber */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:1018:9: 1018 | digits_to_date_time (pc, $1); | ^ | | | (22) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:1018:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+---+ +--------+-------+ |under-read of 24 bytes| |32 bytes| |size: 1120 bytes| +----------------------+ +--------+ +----------------+ gl/parse-datetime.y:1018:9: warning: use of uninitialized value '_180->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 92:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2450 || case 92: /* hybrid: tUNUMBER relunit_snumber */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:1018:9: | 1018 | digits_to_date_time (pc, $1); | | ^ | | | | | (39) use of uninitialized value '_180->textintval' here | gl/parse-datetime.y:1018:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 92:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2450 || case 92: /* hybrid: tUNUMBER relunit_snumber */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:1018:9: | 1018 | digits_to_date_time (pc, $1); | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:1018:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+---+ +--------+-------+ |under-read of 24 bytes| |32 bytes| |size: 1120 bytes| +----------------------+ +--------+ +----------------+ gl/parse-datetime.y:1018:9: warning: use of uninitialized value '_180->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 92:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2450 || case 92: /* hybrid: tUNUMBER relunit_snumber */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:1018:9: | 1018 | digits_to_date_time (pc, $1); | | ^ | | | | | (82) use of uninitialized value '_180->textintval' here | gl/parse-datetime.y:1027:47: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1027 | { $$ = $2.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 94:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2467 || case 94: /* o_colon_minutes: ':' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:1027:47: 1027 | { $$ = $2.value; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval.value' here gl/parse-datetime.y:1027:47: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 94:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2467 || case 94: /* o_colon_minutes: ':' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:1027:47: | 1027 | { $$ = $2.value; } | | ^ | | | | | (39) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1027:47: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 94:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2467 || case 94: /* o_colon_minutes: ':' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:1027:47: | 1027 | { $$ = $2.value; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1027:47: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 94:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2467 || case 94: /* o_colon_minutes: ':' tUNUMBER */ | || ~ | || | | |+->(87) ...to here | 'yyparse': event 88 | |gl/parse-datetime.y:1027:47: | 1027 | { $$ = $2.value; } | | ^ | | | | | (88) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.c:2601:12: warning: use of uninitialized value 'yylval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 2601 | *++yyvsp = yylval; | ^ 'yyparse': events 1-4 | | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1601 | YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); | | ~ | | | | | (2) region created on stack here | | (3) capacity: 56 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | | 'yyparse': events 5-12 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(5) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (6) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(7) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (8) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (10) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(9) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(11) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (12) calling 'yylex' from 'yyparse' | +--> 'yylex': events 13-14 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (13) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (14) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 15-16 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (15) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(16) ...to here | <-------------+ | 'yyparse': events 17-20 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (17) returning to 'yyparse' from 'yylex' |...... | 1819 | if (yyn == 0) | | ~ | | | | | (18) following 'true' branch (when 'yyn_250 == 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1820 || goto yyerrlab; | || ~ | || | | |+--->(19) ...to here |...... | 2518 | if (!yyerrstatus) | | ~ | | | | | (20) following 'true' branch (when 'yyerrstatus_214 == 0')... ->-+ | | | | 'yyparse': events 21-28 | | | | | |+----------------------------------------------------------------------+ | 2518 || if (!yyerrstatus) | || ^ | || | | |+---->(21) ...to here |...... | 2577 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (22) following 'true' branch (when 'yyn_397 != -93')... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 2578 || { | 2579 || yyn += YYSYMBOL_YYerror; | || ~ | || | | |+--------->(23) ...to here | 2580 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+------------------------------------------------+ | 2581 || { | 2582 || yyn = yytable[yyn]; | || ~ | || | | |+------------->(25) ...to here | 2583 | if (0 < yyn) | | ~ | | | | | (26) following 'true' branch (when 'yyn_399 > 0')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 2601 || *++yyvsp = yylval; | || ~ ~ | || | | | || | (28) use of uninitialized value 'yylval' here | |+->(27) ...to here | gl/parse-datetime.c:2601:12: warning: use of uninitialized value 'yylval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 2601 | *++yyvsp = yylval; | ^ 'parse_datetime_body': events 1-6 | |gl/parse-datetime.y:1767:1: | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-17 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1601 | YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); | | ~ | | | | | (15) region created on stack here | | (16) capacity: 56 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (17) following 'false' branch... ->-+ | | | | 'yyparse': events 18-25 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(18) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (19) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(20) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (21) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (23) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(22) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(24) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (25) calling 'yylex' from 'yyparse' | +--> 'yylex': events 26-27 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (26) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (27) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 28-29 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (28) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(29) ...to here | <-------------+ | 'yyparse': events 30-33 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (30) returning to 'yyparse' from 'yylex' |...... | 1819 | if (yyn == 0) | | ~ | | | | | (31) following 'true' branch (when 'yyn_250 == 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1820 || goto yyerrlab; | || ~ | || | | |+--->(32) ...to here |...... | 2518 | if (!yyerrstatus) | | ~ | | | | | (33) following 'true' branch (when 'yyerrstatus_214 == 0')... ->-+ | | | | 'yyparse': events 34-41 | | | | | |+----------------------------------------------------------------------+ | 2518 || if (!yyerrstatus) | || ^ | || | | |+---->(34) ...to here |...... | 2577 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (35) following 'true' branch (when 'yyn_397 != -93')... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 2578 || { | 2579 || yyn += YYSYMBOL_YYerror; | || ~ | || | | |+--------->(36) ...to here | 2580 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (37) following 'true' branch... ->-+ | | | | | | | |+------------------------------------------------+ | 2581 || { | 2582 || yyn = yytable[yyn]; | || ~ | || | | |+------------->(38) ...to here | 2583 | if (0 < yyn) | | ~ | | | | | (39) following 'true' branch (when 'yyn_399 > 0')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 2601 || *++yyvsp = yylval; | || ~ ~ | || | | | || | (41) use of uninitialized value 'yylval' here | |+->(40) ...to here | gl/parse-datetime.y: In function 'digits_to_date_time': gl/parse-datetime.y:273:1: warning: use of uninitialized value 'text_int.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 273 | digits_to_date_time (parser_control *pc, textint text_int) | ^ 'yyparse': events 1-2 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | | 'yyparse': events 3-10 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(3) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(5) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(7) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(9) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (10) calling 'yylex' from 'yyparse' | +--> 'yylex': events 11-12 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (11) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (12) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 13-16 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (13) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (14) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (16) following 'true' branch (when the strings are equal)... ->-+ | |+--->(15) ...to here | | | | | 'lookup_word': event 17 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(17) ...to here | <------+ | 'yylex': events 18-20 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (18) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (19) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(20) ...to here | <------+ | 'yyparse': events 21-26 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (21) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (22) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(23) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(25) ...to here | | | | | 'yyparse': events 27-28 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (28) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(27) ...to here | 'yyparse': events 29-37 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(29) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (30) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(31) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (32) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(33) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (34) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(35) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (36) following 'case 91:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2444 || case 91: /* number: tUNUMBER */ | || ~ | || | | |+->(37) ...to here | 'yyparse': event 38 | |gl/parse-datetime.y:1010:9: | 1010 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (38) calling 'digits_to_date_time' from 'yyparse' | +--> 'digits_to_date_time': events 39-41 | | 273 | digits_to_date_time (parser_control *pc, textint text_int) | | ^ ~ | | | | | | (39) entry to 'digits_to_date_time' (40) region created on stack here | | (41) use of uninitialized value 'text_int.value' here | gl/parse-datetime.y:273:1: warning: use of uninitialized value 'text_int.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-51 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (51) following 'false' branch... ->-+ | | | | 'yyparse': events 52-59 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(52) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (53) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(54) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (55) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (57) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(56) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(58) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (59) calling 'yylex' from 'yyparse' | +--> 'yylex': events 60-61 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (60) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (61) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 62-65 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (62) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (63) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (65) following 'true' branch (when the strings are equal)... ->-+ | |+--->(64) ...to here | | | | | 'lookup_word': event 66 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(66) ...to here | <------+ | 'yylex': events 67-69 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (67) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (68) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(69) ...to here | <------+ | 'yyparse': events 70-75 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (70) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (71) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(72) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (73) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (75) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(74) ...to here | | | | | 'yyparse': events 76-77 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (77) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(76) ...to here | 'yyparse': events 78-86 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(78) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (79) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(80) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (81) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(82) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(84) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (85) following 'case 91:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2444 || case 91: /* number: tUNUMBER */ | || ~ | || | | |+->(86) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:1010:9: | 1010 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (87) calling 'digits_to_date_time' from 'yyparse' | +--> 'digits_to_date_time': events 88-90 | | 273 | digits_to_date_time (parser_control *pc, textint text_int) | | ^ ~ | | | | | | (88) entry to 'digits_to_date_time' (89) region created on stack here | | (90) use of uninitialized value 'text_int.value' here | gl/parse-datetime.y:273:1: warning: use of uninitialized value 'text_int.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-65 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... ->-+ | | | | 'yyparse': events 66-73 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(66) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (67) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(68) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (69) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (71) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(70) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(72) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (73) calling 'yylex' from 'yyparse' | +--> 'yylex': events 74-75 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (74) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (75) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 76-79 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (76) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (77) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (79) following 'true' branch (when the strings are equal)... ->-+ | |+--->(78) ...to here | | | | | 'lookup_word': event 80 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(80) ...to here | <------+ | 'yylex': events 81-83 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (81) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (82) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(83) ...to here | <------+ | 'yyparse': events 84-89 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (84) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (85) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(86) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (87) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (89) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(88) ...to here | | | | | 'yyparse': events 90-91 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (91) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(90) ...to here | 'yyparse': events 92-100 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(92) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (93) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(94) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (95) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(96) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (97) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(98) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (99) following 'case 91:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2444 || case 91: /* number: tUNUMBER */ | || ~ | || | | |+->(100) ...to here | 'yyparse': event 101 | |gl/parse-datetime.y:1010:9: | 1010 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (101) calling 'digits_to_date_time' from 'yyparse' | +--> 'digits_to_date_time': events 102-104 | | 273 | digits_to_date_time (parser_control *pc, textint text_int) | | ^ ~ | | | | | | (102) entry to 'digits_to_date_time' (103) region created on stack here | | (104) use of uninitialized value 'text_int.value' here | gl/parse-datetime.y: In function 'apply_relative_time': gl/parse-datetime.y:313:1: warning: use of uninitialized value 'rel.month' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 313 | apply_relative_time (parser_control *pc, relative_time rel, int factor) | ^ 'yyparse': events 1-2 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | | 'yyparse': events 3-10 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(3) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(5) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(7) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(9) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (10) calling 'yylex' from 'yyparse' | +--> 'yylex': events 11-12 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (11) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (12) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 13-16 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (13) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (14) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (16) following 'true' branch (when the strings are equal)... ->-+ | |+--->(15) ...to here | | | | | 'lookup_word': event 17 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(17) ...to here | <------+ | 'yylex': events 18-20 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (18) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (19) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(20) ...to here | <------+ | 'yyparse': events 21-26 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (21) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (22) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(23) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(25) ...to here | | | | | 'yyparse': events 27-28 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (28) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(27) ...to here | 'yyparse': events 29-37 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(29) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (30) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(31) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (32) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(33) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (34) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(35) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (36) following 'case 55:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2253 || case 55: /* rel: relunit */ | || ~ | || | | |+->(37) ...to here | 'yyparse': event 38 | |gl/parse-datetime.y:920:15: | 920 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (38) calling 'apply_relative_time' from 'yyparse' | +--> 'apply_relative_time': events 39-41 | | 313 | apply_relative_time (parser_control *pc, relative_time rel, int factor) | | ^ ~ | | | | | | (39) entry to 'apply_relative_time' (40) region created on stack here | | (41) use of uninitialized value 'rel.month' here | gl/parse-datetime.y:313:1: warning: use of uninitialized value 'rel.month' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-51 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (51) following 'false' branch... ->-+ | | | | 'yyparse': events 52-59 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(52) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (53) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(54) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (55) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (57) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(56) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(58) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (59) calling 'yylex' from 'yyparse' | +--> 'yylex': events 60-61 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (60) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (61) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 62-65 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (62) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (63) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (65) following 'true' branch (when the strings are equal)... ->-+ | |+--->(64) ...to here | | | | | 'lookup_word': event 66 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(66) ...to here | <------+ | 'yylex': events 67-69 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (67) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (68) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(69) ...to here | <------+ | 'yyparse': events 70-75 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (70) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (71) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(72) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (73) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (75) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(74) ...to here | | | | | 'yyparse': events 76-77 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (77) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(76) ...to here | 'yyparse': events 78-86 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(78) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (79) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(80) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (81) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(82) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(84) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (85) following 'case 55:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2253 || case 55: /* rel: relunit */ | || ~ | || | | |+->(86) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:920:15: | 920 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (87) calling 'apply_relative_time' from 'yyparse' | +--> 'apply_relative_time': events 88-90 | | 313 | apply_relative_time (parser_control *pc, relative_time rel, int factor) | | ^ ~ | | | | | | (88) entry to 'apply_relative_time' (89) region created on stack here | | (90) use of uninitialized value 'rel.month' here | gl/parse-datetime.y:313:1: warning: use of uninitialized value 'rel.month' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-65 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... ->-+ | | | | 'yyparse': events 66-73 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(66) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (67) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(68) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (69) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (71) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(70) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(72) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (73) calling 'yylex' from 'yyparse' | +--> 'yylex': events 74-75 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (74) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (75) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 76-79 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (76) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (77) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (79) following 'true' branch (when the strings are equal)... ->-+ | |+--->(78) ...to here | | | | | 'lookup_word': event 80 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(80) ...to here | <------+ | 'yylex': events 81-83 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (81) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (82) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(83) ...to here | <------+ | 'yyparse': events 84-89 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (84) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (85) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(86) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (87) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (89) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(88) ...to here | | | | | 'yyparse': events 90-91 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (91) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(90) ...to here | 'yyparse': events 92-100 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(92) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (93) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(94) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (95) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(96) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (97) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(98) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (99) following 'case 55:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2253 || case 55: /* rel: relunit */ | || ~ | || | | |+->(100) ...to here | 'yyparse': event 101 | |gl/parse-datetime.y:920:15: | 920 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (101) calling 'apply_relative_time' from 'yyparse' | +--> 'apply_relative_time': events 102-104 | | 313 | apply_relative_time (parser_control *pc, relative_time rel, int factor) | | ^ ~ | | | | | | (102) entry to 'apply_relative_time' (103) region created on stack here | | (104) use of uninitialized value 'rel.month' here | gl/read-file.c: In function '_gnutls_fread_file': gl/read-file.c:198:13: warning: leak of FILE 'fopen (filename_11(D), mode_4)' [CWE-775] [-Wanalyzer-file-leak] 198 | if (flags & RF_SENSITIVE) | ^ '_gnutls_read_file': events 1-6 | | 190 | read_file (const char *filename, int flags, size_t *length) | | ^ | | | | | (1) entry to '_gnutls_read_file' |...... | 193 | FILE *stream = fopen (filename, mode); | | ~ | | | | | (2) opened here | 194 | | 195 | if (!stream) | | ~ | | | | | (3) assuming 'fopen (filename_11(D), mode_4)' is non-NULL | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 198 || if (flags & RF_SENSITIVE) | || ~ | || | | |+->(5) ...to here |...... | 201 | char *out = fread_file (stream, flags, length); | | ~ | | | | | (6) calling '_gnutls_fread_file' from '_gnutls_read_file' | +--> '_gnutls_fread_file': events 7-10 | | 52 | fread_file (FILE *stream, int flags, size_t *length) | | ^ | | | | | (7) entry to '_gnutls_fread_file' |...... | 61 | if (fstat (fileno (stream), &st) >= 0 && S_ISREG (st.st_mode)) | | ~ | | | | | (8) following 'true' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 62 || { | 63 || off_t pos = ftello (stream); | || ~ ~ | || | | | || | (10) if 'ftello' throws an exception... | |+------->(9) ...to here | '_gnutls_read_file': event 11 | | 198 | if (flags & RF_SENSITIVE) | | ^ | | | | | (11) 'fopen (filename_11(D), mode_4)' leaks here; was opened at (2) | gl/parse-datetime.c: In function 'yyparse': gl/parse-datetime.c:1806:12: warning: use of uninitialized value 'yylval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1806 | *++yyvsp = yylval; | ^ 'yyparse': events 1-4 | | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1601 | YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); | | ~ | | | | | (2) region created on stack here | | (3) capacity: 56 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | | 'yyparse': events 5-12 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(5) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (6) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(7) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (8) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (10) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(9) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(11) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (12) calling 'yylex' from 'yyparse' | +--> 'yylex': events 13-14 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (13) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (14) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 15-16 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (15) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(16) ...to here | <-------------+ | 'yyparse': events 17-22 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (17) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (18) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(19) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (20) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (22) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(21) ...to here | | | | | 'yyparse': events 23-24 | | | | | |+-----------------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(23) ...to here |...... | 1806 | *++yyvsp = yylval; | | ~ | | | | | (24) use of uninitialized value 'yylval' here | gl/parse-datetime.c:1806:12: warning: use of uninitialized value 'yylval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1806 | *++yyvsp = yylval; | ^ 'parse_datetime_body': events 1-6 | |gl/parse-datetime.y:1767:1: | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-17 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1601 | YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); | | ~ | | | | | (15) region created on stack here | | (16) capacity: 56 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (17) following 'false' branch... ->-+ | | | | 'yyparse': events 18-25 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(18) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (19) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(20) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (21) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (23) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(22) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(24) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (25) calling 'yylex' from 'yyparse' | +--> 'yylex': events 26-27 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (26) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (27) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 28-29 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (28) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(29) ...to here | <-------------+ | 'yyparse': events 30-35 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (30) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (31) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(32) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (33) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (35) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(34) ...to here | | | | | 'yyparse': events 36-37 | | | | | |+-----------------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(36) ...to here |...... | 1806 | *++yyvsp = yylval; | | ~ | | | | | (37) use of uninitialized value 'yylval' here | gl/parse-datetime.c:1839:9: warning: use of uninitialized value '*_14' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1839 | yyval = yyvsp[1-yylen]; | ^ 'yyparse': events 1-2 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-8 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1819 | if (yyn == 0) | ~ | | | (6) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1820 || goto yyerrlab; 1821 || goto yyreduce; || ~ || | |+->(7) ...to here ...... 1839 | yyval = yyvsp[1-yylen]; | ~ | | | (8) use of uninitialized value '*_14' here gl/parse-datetime.c:1839:9: warning: use of uninitialized value '*_14' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1839 | yyval = yyvsp[1-yylen]; | ^ 'yyparse': events 1-3 | | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (13) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 14-15 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (14) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(15) ...to here | <-------------+ | 'yyparse': events 16-21 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (16) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (17) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(18) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (19) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(20) ...to here |...... | 1839 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (21) use of uninitialized value '*_14' here | gl/parse-datetime.c:1839:9: warning: use of uninitialized value '*_14' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1839 | yyval = yyvsp[1-yylen]; | ^ 'parse_datetime_body': events 1-6 | |gl/parse-datetime.y:1767:1: | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-22 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (20) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(21) ...to here |...... | 1839 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (22) use of uninitialized value '*_14' here | gl/parse-datetime.c:1839:9: warning: use of uninitialized value '*_14' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1839 | yyval = yyvsp[1-yylen]; | ^ 'parse_datetime_body': events 1-6 | |gl/parse-datetime.y:1767:1: | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-24 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (24) calling 'yylex' from 'yyparse' | +--> 'yylex': events 25-26 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (25) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (26) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 27-28 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (27) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(28) ...to here | <-------------+ | 'yyparse': events 29-34 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (29) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1839 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (34) use of uninitialized value '*_14' here | gl/parse-datetime.c:1839:9: warning: use of uninitialized value '*_14' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1839 | yyval = yyvsp[1-yylen]; | ^ 'parse_datetime': events 1-2 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(69) ...to here |...... | 1839 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (70) use of uninitialized value '*_14' here | gl/parse-datetime.c:1839:9: warning: use of uninitialized value '*_14' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1839 | yyval = yyvsp[1-yylen]; | ^ 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(83) ...to here |...... | 1839 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (84) use of uninitialized value '*_14' here | gl/parse-datetime.y:616:21: warning: use of uninitialized value 'yyvsp_221->timespec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 616 | pc->seconds = $2; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 4:' branch... ->-+ | | | | |+----------------------------------------+ 1844 || { 1845 || case 4: /* timespec: '@' seconds */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:616:21: 616 | pc->seconds = $2; | ^ | | | (22) use of uninitialized value 'yyvsp_221->timespec' here gl/parse-datetime.y:616:21: warning: use of uninitialized value 'yyvsp_221->timespec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 4:' branch... ->-+ | | | | | | | |+----------------------------------------+ | 1844 || { | 1845 || case 4: /* timespec: '@' seconds */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:616:21: | 616 | pc->seconds = $2; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->timespec' here | gl/parse-datetime.y:688:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 688 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 19:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1942 || case 19: /* time: tUNUMBER tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:688:9: 688 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:688:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:688:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 19:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1942 || case 19: /* time: tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:688:9: | 688 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:688:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 19:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1942 || case 19: /* time: tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:688:9: | 688 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:688:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:688:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 19:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1942 || case 19: /* time: tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:688:9: | 688 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:688:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 19:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1942 || case 19: /* time: tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:688:9: | 688 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:689:33: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 689 | pc->meridian = $2; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 19:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1942 || case 19: /* time: tUNUMBER tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:689:33: 689 | pc->meridian = $2; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:689:33: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 19:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1942 || case 19: /* time: tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:689:33: | 689 | pc->meridian = $2; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:693:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 20:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:693:9: 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ | | | (22) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:693:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:693:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 20:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:693:9: 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:693:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:693:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (39) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:693:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:693:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:693:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:693:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:693:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:693:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:693:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (82) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:693:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:693:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:693:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (96) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:693:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:693:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:693:9: | 693 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:694:33: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 694 | pc->meridian = $4; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 20:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:694:33: 694 | pc->meridian = $4; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:694:33: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 20:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1951 || case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:694:33: | 694 | pc->meridian = $4; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 21:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:698:9: 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |264 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 21:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:698:9: 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (39) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (39) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |264 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (96) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:698:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:698:9: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (96) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:698:105: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 21:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:698:105: 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:698:105: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:698:105: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:698:105: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:698:105: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:698:105: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:105: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:698:105: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:698:105: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:698:105: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:698:105: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:698:134: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 21:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:698:134: 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:698:134: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:698:134: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:698:134: | 698 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:698:134: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:699:33: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 699 | pc->meridian = $6; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 21:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:699:33: 699 | pc->meridian = $6; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:699:33: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 21:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1960 || case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:699:33: | 699 | pc->meridian = $6; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:707:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 707 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 23:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1969 || case 23: /* iso_8601_time: tUNUMBER zone_offset */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:707:9: 707 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:707:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:707:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 23:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1969 || case 23: /* iso_8601_time: tUNUMBER zone_offset */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:707:9: | 707 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:707:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 23:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1969 || case 23: /* iso_8601_time: tUNUMBER zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:707:9: | 707 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:707:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:707:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 23:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1969 || case 23: /* iso_8601_time: tUNUMBER zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:707:9: | 707 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:707:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 23:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1969 || case 23: /* iso_8601_time: tUNUMBER zone_offset */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:707:9: | 707 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:712:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 24:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:712:9: 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ | | | (22) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:712:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:712:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 24:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:712:9: 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:712:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:712:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (39) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:712:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:712:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:712:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:712:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:712:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:712:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:712:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (82) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:712:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:712:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:712:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (96) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:712:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:712:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 24:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1978 || case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:712:9: | 712 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 25:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:717:9: 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |264 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 25:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:717:9: 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (39) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (39) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |264 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (96) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:717:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:717:9: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (96) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:717:105: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 25:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:717:105: 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:717:105: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:717:105: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:717:105: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:717:105: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:717:105: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:105: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:717:105: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:717:105: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:717:105: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:717:105: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:717:134: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 25:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:717:134: 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:717:134: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:717:134: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 25:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1987 || case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:717:134: | 717 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:717:134: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:731:15: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 731 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 28:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 1996 || case 28: /* zone_offset: tSNUMBER o_colon_minutes */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:731:15: 731 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:731:15: warning: use of uninitialized value '_59->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 28:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1996 || case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:731:15: | 731 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (39) use of uninitialized value '_59->textintval' here | gl/parse-datetime.y:731:15: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 28:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1996 || case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:731:15: | 731 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:731:15: warning: use of uninitialized value '_59->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 28:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1996 || case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:731:15: | 731 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (82) use of uninitialized value '_59->textintval' here | gl/parse-datetime.y:731:15: warning: use of uninitialized value '_59->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 28:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1996 || case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:731:15: | 731 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (96) use of uninitialized value '_59->textintval' here | gl/parse-datetime.y:754:36: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 754 | { pc->local_isdst = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 29:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2005 || case 29: /* local_zone: tLOCAL_ZONE */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:754:36: 754 | { pc->local_isdst = $1; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:754:36: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 29:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2005 || case 29: /* local_zone: tLOCAL_ZONE */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:754:36: | 754 | { pc->local_isdst = $1; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:766:34: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 766 | { pc->time_zone = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 31:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2020 || case 31: /* zone: tZONE */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:766:34: 766 | { pc->time_zone = $1; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:766:34: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 31:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2020 || case 31: /* zone: tZONE */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:766:34: | 766 | { pc->time_zone = $1; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:770:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 770 | { pc->time_zone = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 33:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2032 || case 33: /* zone: tZONE relunit_snumber */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:770:35: 770 | { pc->time_zone = $1; | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:770:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:770:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 33:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2032 || case 33: /* zone: tZONE relunit_snumber */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:770:35: | 770 | { pc->time_zone = $1; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:770:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 33:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2032 || case 33: /* zone: tZONE relunit_snumber */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:770:35: | 770 | { pc->time_zone = $1; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:770:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:770:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 33:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2032 || case 33: /* zone: tZONE relunit_snumber */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:770:35: | 770 | { pc->time_zone = $1; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:770:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 33:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2032 || case 33: /* zone: tZONE relunit_snumber */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:770:35: | 770 | { pc->time_zone = $1; | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:771:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 771 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 33:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2032 || case 33: /* zone: tZONE relunit_snumber */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:771:15: 771 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | ^ | | | (22) use of uninitialized value 'yyvsp_221->rel' here gl/parse-datetime.y:771:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 33:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2032 || case 33: /* zone: tZONE relunit_snumber */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:771:15: | 771 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->rel' here | gl/parse-datetime.y:776:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 776 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 34:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2041 || case 34: /* zone: 'T' relunit_snumber */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:776:15: 776 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | ^ | | | (22) use of uninitialized value 'yyvsp_221->rel' here gl/parse-datetime.y:776:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 34:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2041 || case 34: /* zone: 'T' relunit_snumber */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:776:15: | 776 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->rel' here | gl/parse-datetime.y:780:15: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 35:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:780:15: 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:780:15: warning: use of uninitialized value '_72->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 35:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:780:15: | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (39) use of uninitialized value '_72->textintval' here | gl/parse-datetime.y:780:15: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 35:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:780:15: | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:780:15: warning: use of uninitialized value '_72->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 35:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:780:15: | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (82) use of uninitialized value '_72->textintval' here | gl/parse-datetime.y:780:15: warning: use of uninitialized value '_72->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 35:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:780:15: | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (96) use of uninitialized value '_72->textintval' here | gl/parse-datetime.y:781:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 781 | if (ckd_add (&pc->time_zone, pc->time_zone, $1)) YYABORT; } | ^ 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 35:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:780:15: | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (39) calling 'time_zone_hhmm' from 'yyparse' | +--> 'time_zone_hhmm': events 40-42 | | 1234 | time_zone_hhmm (parser_control *pc, textint s, intmax_t mm) | | ^ | | | | | (40) entry to 'time_zone_hhmm' |...... | 1254 | if (overflow || ! (-24 * 60 <= n_minutes && n_minutes <= 24 * 60)) | | ~ | | | | | (41) following 'false' branch... ->-+ | | | | | | | |+---------------------------------------------------+ | 1255 || return false; | 1256 || pc->time_zone = n_minutes * 60; | || ~ | || | | |+->(42) ...to here | <------+ | 'yyparse': event 43 | | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (43) returning to 'yyparse' from 'time_zone_hhmm' | 'yyparse': events 44-46 | | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (44) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 781 || if (ckd_add (&pc->time_zone, pc->time_zone, $1)) YYABORT; } | || ~ ~ | || | | | || | (46) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | |+------->(45) ...to here | gl/parse-datetime.y:781:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 781 | if (ckd_add (&pc->time_zone, pc->time_zone, $1)) YYABORT; } | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:781:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 35:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(87) ...to here | 'yyparse': event 88 | |gl/parse-datetime.y:780:15: | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (88) calling 'time_zone_hhmm' from 'yyparse' | +--> 'time_zone_hhmm': events 89-91 | | 1234 | time_zone_hhmm (parser_control *pc, textint s, intmax_t mm) | | ^ | | | | | (89) entry to 'time_zone_hhmm' |...... | 1254 | if (overflow || ! (-24 * 60 <= n_minutes && n_minutes <= 24 * 60)) | | ~ | | | | | (90) following 'false' branch... ->-+ | | | | | | | |+---------------------------------------------------+ | 1255 || return false; | 1256 || pc->time_zone = n_minutes * 60; | || ~ | || | | |+->(91) ...to here | <------+ | 'yyparse': event 92 | | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (92) returning to 'yyparse' from 'time_zone_hhmm' | 'yyparse': events 93-95 | | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (93) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 781 || if (ckd_add (&pc->time_zone, pc->time_zone, $1)) YYABORT; } | || ~ ~ | || | | | || | (95) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | |+------->(94) ...to here | gl/parse-datetime.y:781:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 781 | if (ckd_add (&pc->time_zone, pc->time_zone, $1)) YYABORT; } | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:781:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (76) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 77-80 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (77) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (78) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (80) following 'true' branch (when the strings are equal)... ->-+ | |+--->(79) ...to here | | | | | 'lookup_word': event 81 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(81) ...to here | <------+ | 'yylex': events 82-84 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (82) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (83) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(84) ...to here | <------+ | 'yyparse': events 85-90 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (85) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (86) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(87) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (88) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (90) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(89) ...to here | | | | | 'yyparse': events 91-92 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (92) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(91) ...to here | 'yyparse': events 93-101 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(93) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (94) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(95) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (96) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(97) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (98) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(99) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (100) following 'case 35:' branch... ->-+ | | | |...... | | | | |+------------------------------------------+ | 2050 || case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | || ~ | || | | |+->(101) ...to here | 'yyparse': event 102 | |gl/parse-datetime.y:780:15: | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (102) calling 'time_zone_hhmm' from 'yyparse' | +--> 'time_zone_hhmm': events 103-105 | | 1234 | time_zone_hhmm (parser_control *pc, textint s, intmax_t mm) | | ^ | | | | | (103) entry to 'time_zone_hhmm' |...... | 1254 | if (overflow || ! (-24 * 60 <= n_minutes && n_minutes <= 24 * 60)) | | ~ | | | | | (104) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------------------+ | 1255 || return false; | 1256 || pc->time_zone = n_minutes * 60; | || ~ | || | | |+->(105) ...to here | <------+ | 'yyparse': event 106 | | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (106) returning to 'yyparse' from 'time_zone_hhmm' | 'yyparse': events 107-109 | | 780 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (107) following 'true' branch... ->-+ | | | | | | | |+-----------------------------------------------+ | 781 || if (ckd_add (&pc->time_zone, pc->time_zone, $1)) YYABORT; } | || ~ ~ | || | | | || | (109) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | |+------->(108) ...to here | gl/parse-datetime.y:781:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 781 | if (ckd_add (&pc->time_zone, pc->time_zone, $1)) YYABORT; } | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:783:34: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 783 | { pc->time_zone = $1 + 60 * 60; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 36:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2057 || case 36: /* zone: tDAYZONE */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:783:34: 783 | { pc->time_zone = $1 + 60 * 60; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:783:34: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 36:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2057 || case 36: /* zone: tDAYZONE */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:783:34: | 783 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:785:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 785 | { pc->time_zone = $1 + 60 * 60; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 37:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2063 || case 37: /* zone: tZONE tDST */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:785:35: 785 | { pc->time_zone = $1 + 60 * 60; } | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:785:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:785:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 37:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2063 || case 37: /* zone: tZONE tDST */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:785:35: | 785 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:785:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 37:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2063 || case 37: /* zone: tZONE tDST */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:785:35: | 785 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:785:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:785:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 37:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2063 || case 37: /* zone: tZONE tDST */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:785:35: | 785 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:785:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 37:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2063 || case 37: /* zone: tZONE tDST */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:785:35: | 785 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:792:35: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 792 | pc->day_number = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 38:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2069 || case 38: /* day: tDAY */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:792:35: 792 | pc->day_number = $1; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:792:35: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 38:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2069 || case 38: /* day: tDAY */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:792:35: | 792 | pc->day_number = $1; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:797:36: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 797 | pc->day_number = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 39:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2078 || case 39: /* day: tDAY ',' */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:797:36: 797 | pc->day_number = $1; | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:797:36: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:797:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 39:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2078 || case 39: /* day: tDAY ',' */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:797:36: | 797 | pc->day_number = $1; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:797:36: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 39:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2078 || case 39: /* day: tDAY ',' */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:797:36: | 797 | pc->day_number = $1; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:797:36: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:797:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 39:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2078 || case 39: /* day: tDAY ',' */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:797:36: | 797 | pc->day_number = $1; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:797:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 39:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2078 || case 39: /* day: tDAY ',' */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:797:36: | 797 | pc->day_number = $1; | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:801:37: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 801 | pc->day_ordinal = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 40:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2087 || case 40: /* day: tORDINAL tDAY */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:801:37: 801 | pc->day_ordinal = $1; | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:801:37: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:801:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 40:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2087 || case 40: /* day: tORDINAL tDAY */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:801:37: | 801 | pc->day_ordinal = $1; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:801:37: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 40:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2087 || case 40: /* day: tORDINAL tDAY */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:801:37: | 801 | pc->day_ordinal = $1; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:801:37: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:801:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 40:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2087 || case 40: /* day: tORDINAL tDAY */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:801:37: | 801 | pc->day_ordinal = $1; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:801:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 40:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2087 || case 40: /* day: tORDINAL tDAY */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:801:37: | 801 | pc->day_ordinal = $1; | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:802:35: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 802 | pc->day_number = $2; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 40:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2087 || case 40: /* day: tORDINAL tDAY */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:802:35: 802 | pc->day_number = $2; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:802:35: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 40:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2087 || case 40: /* day: tORDINAL tDAY */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:802:35: | 802 | pc->day_number = $2; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:807:49: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 807 | pc->day_ordinal = $1.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 41:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2097 || case 41: /* day: tUNUMBER tDAY */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:807:49: 807 | pc->day_ordinal = $1.value; | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:807:49: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:807:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 41:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2097 || case 41: /* day: tUNUMBER tDAY */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:807:49: | 807 | pc->day_ordinal = $1.value; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:807:49: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 41:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2097 || case 41: /* day: tUNUMBER tDAY */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:807:49: | 807 | pc->day_ordinal = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:807:49: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:807:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 41:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2097 || case 41: /* day: tUNUMBER tDAY */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:807:49: | 807 | pc->day_ordinal = $1.value; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:807:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 41:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2097 || case 41: /* day: tUNUMBER tDAY */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:807:49: | 807 | pc->day_ordinal = $1.value; | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:808:35: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 808 | pc->day_number = $2; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 41:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2097 || case 41: /* day: tUNUMBER tDAY */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:808:35: 808 | pc->day_number = $2; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:808:35: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 41:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2097 || case 41: /* day: tUNUMBER tDAY */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:808:35: | 808 | pc->day_number = $2; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:816:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 816 | pc->month = $1.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 42:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:816:43: 816 | pc->month = $1.value; | ^ | | | (22) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:816:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:816:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:816:43: | 816 | pc->month = $1.value; | | ^ | | | | | (39) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:816:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:816:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:816:43: | 816 | pc->month = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:816:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:816:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:816:43: | 816 | pc->month = $1.value; | | ^ | | | | | (82) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:816:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:816:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:816:43: | 816 | pc->month = $1.value; | | ^ | | | | | (96) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:816:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:817:40: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 817 | pc->day = $3.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 42:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:817:40: 817 | pc->day = $3.value; | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval.value' here gl/parse-datetime.y:817:40: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:817:40: | 817 | pc->day = $3.value; | | ^ | | | | | (39) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:817:40: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:817:40: | 817 | pc->day = $3.value; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:817:40: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 42:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(87) ...to here | 'yyparse': event 88 | |gl/parse-datetime.y:817:40: | 817 | pc->day = $3.value; | | ^ | | | | | (88) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:817:40: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (76) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 77-80 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (77) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (78) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (80) following 'true' branch (when the strings are equal)... ->-+ | |+--->(79) ...to here | | | | | 'lookup_word': event 81 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(81) ...to here | <------+ | 'yylex': events 82-84 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (82) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (83) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(84) ...to here | <------+ | 'yyparse': events 85-90 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (85) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (86) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(87) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (88) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (90) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(89) ...to here | | | | | 'yyparse': events 91-92 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (92) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(91) ...to here | 'yyparse': events 93-101 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(93) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (94) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(95) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (96) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(97) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (98) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(99) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (100) following 'case 42:' branch... ->-+ | | | |...... | | | | |+------------------------------------------+ | 2107 || case 42: /* date: tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(101) ...to here | 'yyparse': event 102 | |gl/parse-datetime.y:817:40: | 817 | pc->day = $3.value; | | ^ | | | | | (102) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:826:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 826 | if (4 <= $1.digits) | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 43:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:826:40: 826 | if (4 <= $1.digits) | ^ | | | (22) out-of-bounds read from byte -208 till byte -201 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:826:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------+ |read of 'idx_t' (8 bytes)| +-------------------------+ ^ | | +-------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +-------------------------+ +-------------------------------------+ |~~~~~~~~~~~~+~~~~~~~~~~~~||~+~~||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |200 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:826:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:826:40: | 826 | if (4 <= $1.digits) | | ^ | | | | | (39) out-of-bounds read from byte -152 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:826:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------+ |read of 'idx_t' (8 bytes)| +-------------------------+ ^ | | +-------------------------+ +----------+-------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +-------------------------+ +--------------------------------------+ |~~~~~~~~~~~~+~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |144 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:826:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:826:40: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) out-of-bounds read from byte -208 till byte -201 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:826:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------+ |read of 'idx_t' (8 bytes)| +-------------------------+ ^ | | +-------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +-------------------------+ +-------------------------------------+ |~~~~~~~~~~~~+~~~~~~~~~~~~||~+~~||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |200 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:826:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:826:40: | 826 | if (4 <= $1.digits) | | ^ | | | | | (82) out-of-bounds read from byte -152 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:826:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------+ |read of 'idx_t' (8 bytes)| +-------------------------+ ^ | | +-------------------------+ +----------+-------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +-------------------------+ +--------------------------------------+ |~~~~~~~~~~~~+~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |144 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:826:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:826:40: | 826 | if (4 <= $1.digits) | | ^ | | | | | (96) out-of-bounds read from byte -152 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:826:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------+ |read of 'idx_t' (8 bytes)| +-------------------------+ ^ | | +-------------------------+ +----------+-------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +-------------------------+ +--------------------------------------+ |~~~~~~~~~~~~+~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |144 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:836:22: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 836 | pc->year = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 43:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': events 22-24 gl/parse-datetime.y:826:12: 826 | if (4 <= $1.digits) | ^ | | | (22) following 'true' branch... ->-+ | | | | |+----------------------------------------------+ 827 || { 828 || if (debugging (pc)) || ~ || | |+----------->(23) ...to here ...... 836 | pc->year = $1; | ~ | | | (24) out-of-bounds read from byte -224 till byte -201 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:836:22: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 836 | pc->year = $1; | ^ +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+----+ +--------+-------+ |under-read of 24 bytes| |200 bytes| |size: 1120 bytes| +----------------------+ +---------+ +----------------+ gl/parse-datetime.y:836:22: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': events 39-41 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (39) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(40) ...to here |...... | 836 | pc->year = $1; | | ~ | | | | | (41) out-of-bounds read from byte -168 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:836:22: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 836 | pc->year = $1; | ^ +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+----+ +--------+-------+ |under-read of 24 bytes| |144 bytes| |size: 1120 bytes| +----------------------+ +---------+ +----------------+ gl/parse-datetime.y:836:22: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 836 | pc->year = $1; | | ~ | | | | | (38) out-of-bounds read from byte -224 till byte -201 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:836:22: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 836 | pc->year = $1; | ^ +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+----+ +--------+-------+ |under-read of 24 bytes| |200 bytes| |size: 1120 bytes| +----------------------+ +---------+ +----------------+ gl/parse-datetime.y:836:22: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': events 82-84 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (82) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(83) ...to here |...... | 836 | pc->year = $1; | | ~ | | | | | (84) out-of-bounds read from byte -168 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:836:22: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 836 | pc->year = $1; | ^ +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+----+ +--------+-------+ |under-read of 24 bytes| |144 bytes| |size: 1120 bytes| +----------------------+ +---------+ +----------------+ gl/parse-datetime.y:836:22: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(95) ...to here | 'yyparse': events 96-98 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (96) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(97) ...to here |...... | 836 | pc->year = $1; | | ~ | | | | | (98) out-of-bounds read from byte -168 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:836:22: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 836 | pc->year = $1; | ^ +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+----+ +--------+-------+ |under-read of 24 bytes| |144 bytes| |size: 1120 bytes| +----------------------+ +---------+ +----------------+ gl/parse-datetime.y:837:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 837 | pc->month = $3.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 43:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': events 22-24 gl/parse-datetime.y:826:12: 826 | if (4 <= $1.digits) | ^ | | | (22) following 'true' branch... ->-+ | | | | |+----------------------------------------------+ 827 || { 828 || if (debugging (pc)) || ~ || | |+----------->(23) ...to here ...... 837 | pc->month = $3.value; | | | | (24) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:837:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 837 | pc->month = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:837:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': events 39-41 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (39) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(40) ...to here |...... | 837 | pc->month = $3.value; | | | | | | | (41) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:837:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 837 | pc->month = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:837:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 837 | pc->month = $3.value; | | | | | | | (38) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:837:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 837 | pc->month = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:837:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': events 82-84 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (82) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(83) ...to here |...... | 837 | pc->month = $3.value; | | | | | | | (84) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:837:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 837 | pc->month = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:837:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(95) ...to here | 'yyparse': events 96-98 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (96) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(97) ...to here |...... | 837 | pc->month = $3.value; | | | | | | | (98) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:837:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 837 | pc->month = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:838:44: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 838 | pc->day = $5.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 43:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': events 22-24 gl/parse-datetime.y:826:12: 826 | if (4 <= $1.digits) | ^ | | | (22) following 'true' branch... ->-+ | | | | |+----------------------------------------------+ 827 || { 828 || if (debugging (pc)) || ~ || | |+----------->(23) ...to here ...... 838 | pc->day = $5.value; | | | | (24) use of uninitialized value 'yyvsp_221->textintval.value' here gl/parse-datetime.y:838:44: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 838 | pc->day = $5.value; | ^ 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': events 39-41 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (39) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(40) ...to here |...... | 838 | pc->day = $5.value; | | | | | | | (41) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:838:44: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 838 | pc->day = $5.value; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 838 | pc->day = $5.value; | | | | | | | (38) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:838:44: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 838 | pc->day = $5.value; | ^ 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(87) ...to here | 'yyparse': events 88-90 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (88) following 'true' branch... ->-+ | | | | | | | |+----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(89) ...to here |...... | 838 | pc->day = $5.value; | | | | | | | (90) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:838:44: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 838 | pc->day = $5.value; | ^ 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (76) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 77-80 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (77) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (78) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (80) following 'true' branch (when the strings are equal)... ->-+ | |+--->(79) ...to here | | | | | 'lookup_word': event 81 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(81) ...to here | <------+ | 'yylex': events 82-84 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (82) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (83) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(84) ...to here | <------+ | 'yyparse': events 85-90 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (85) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (86) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(87) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (88) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (90) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(89) ...to here | | | | | 'yyparse': events 91-92 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (92) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(91) ...to here | 'yyparse': events 93-101 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(93) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (94) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(95) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (96) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(97) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (98) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(99) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (100) following 'case 43:' branch... ->-+ | | | |...... | | | | |+------------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(101) ...to here | 'yyparse': events 102-104 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (102) following 'true' branch... ->-+ | | | | | | | |+-----------------------------------------------+ | 827 || { | 828 || if (debugging (pc)) | || ~ | || | | |+----------->(103) ...to here |...... | 838 | pc->day = $5.value; | | | | | | | (104) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:847:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 847 | pc->month = $1.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 43:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': events 22-24 gl/parse-datetime.y:826:12: 826 | if (4 <= $1.digits) | ^ | | | (22) following 'false' branch... ->-+ | | ...... | | |+-----------------------------------------------+ 842 || if (debugging (pc)) || ~ || | |+----------->(23) ...to here ...... 847 | pc->month = $1.value; | | | | (24) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:847:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 847 | pc->month = $1.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:847:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': events 39-41 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (39) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(40) ...to here |...... | 847 | pc->month = $1.value; | | | | | | | (41) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 847 | pc->month = $1.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:847:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 847 | pc->month = $1.value; | | | | | | | (38) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 847 | pc->month = $1.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:847:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': events 82-84 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (82) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(83) ...to here |...... | 847 | pc->month = $1.value; | | | | | | | (84) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 847 | pc->month = $1.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:847:47: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(95) ...to here | 'yyparse': events 96-98 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (96) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(97) ...to here |...... | 847 | pc->month = $1.value; | | | | | | | (98) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:47: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 847 | pc->month = $1.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:848:45: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 848 | pc->day = $3.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 43:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': events 22-24 gl/parse-datetime.y:826:12: 826 | if (4 <= $1.digits) | ^ | | | (22) following 'false' branch... ->-+ | | ...... | | |+-----------------------------------------------+ 842 || if (debugging (pc)) || ~ || | |+----------->(23) ...to here ...... 848 | pc->day = $3.value; | | | | (24) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:848:45: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 848 | pc->day = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:848:45: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': events 39-41 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (39) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(40) ...to here |...... | 848 | pc->day = $3.value; | | | | | | | (41) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:848:45: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 848 | pc->day = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:848:45: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 848 | pc->day = $3.value; | | | | | | | (38) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:848:45: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 848 | pc->day = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:848:45: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': events 82-84 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (82) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(83) ...to here |...... | 848 | pc->day = $3.value; | | | | | | | (84) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:848:45: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 848 | pc->day = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:848:45: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(95) ...to here | 'yyparse': events 96-98 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (96) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(97) ...to here |...... | 848 | pc->day = $3.value; | | | | | | | (98) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:848:45: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 848 | pc->day = $3.value; | ^ +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:849:22: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 849 | pc->year = $5; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 43:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': events 22-24 gl/parse-datetime.y:826:12: 826 | if (4 <= $1.digits) | ^ | | | (22) following 'false' branch... ->-+ | | ...... | | |+-----------------------------------------------+ 842 || if (debugging (pc)) || ~ || | |+----------->(23) ...to here ...... 849 | pc->year = $5; | ~ | | | (24) use of uninitialized value 'yyvsp_221->textintval' here gl/parse-datetime.y:849:22: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 849 | pc->year = $5; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 43:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2116 || case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:826:12: | 826 | if (4 <= $1.digits) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 842 || if (debugging (pc)) | || ~ | || | | |+----------->(37) ...to here |...... | 849 | pc->year = $5; | | ~ | | | | | (38) use of uninitialized value 'yyvsp_221->textintval' here | gl/parse-datetime.y:855:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 855 | pc->day = $1.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 44:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:855:41: 855 | pc->day = $1.value; | ^ | | | (22) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:855:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:855:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:855:41: | 855 | pc->day = $1.value; | | ^ | | | | | (39) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:855:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:855:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:855:41: | 855 | pc->day = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:855:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:855:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:855:41: | 855 | pc->day = $1.value; | | ^ | | | | | (82) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:855:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:855:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:855:41: | 855 | pc->day = $1.value; | | ^ | | | | | (96) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:855:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:856:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 856 | pc->month = $3.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 44:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:856:43: 856 | pc->month = $3.value; | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:856:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:856:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:856:43: | 856 | pc->month = $3.value; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:856:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:856:43: | 856 | pc->month = $3.value; | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:856:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:856:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:856:43: | 856 | pc->month = $3.value; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:856:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 44:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2153 || case 44: /* date: tUNUMBER '.' tUNUMBER '.' */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:856:43: | 856 | pc->month = $3.value; | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:861:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 861 | pc->day = $1.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 45:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:861:41: 861 | pc->day = $1.value; | ^ | | | (22) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:861:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:861:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:861:41: | 861 | pc->day = $1.value; | | ^ | | | | | (39) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:861:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:861:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:861:41: | 861 | pc->day = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:861:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |208 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:861:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:861:41: | 861 | pc->day = $1.value; | | ^ | | | | | (82) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:861:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:861:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:861:41: | 861 | pc->day = $1.value; | | ^ | | | | | (96) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:861:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |152 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:862:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 862 | pc->month = $3.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 45:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:862:43: 862 | pc->month = $3.value; | ^ | | | (22) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:862:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:862:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:862:43: | 862 | pc->month = $3.value; | | ^ | | | | | (39) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:862:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:862:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:862:43: | 862 | pc->month = $3.value; | | ^ | | | | | (36) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:862:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:862:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:862:43: | 862 | pc->month = $3.value; | | ^ | | | | | (82) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:862:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:862:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:862:43: | 862 | pc->month = $3.value; | | ^ | | | | | (96) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:862:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:863:18: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 863 | pc->year = $5; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 45:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:863:18: 863 | pc->year = $5; | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval' here gl/parse-datetime.y:863:18: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 45:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2163 || case 45: /* date: tUNUMBER '.' tUNUMBER_DOTTED '.' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:863:18: | 863 | pc->year = $5; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval' here | gl/parse-datetime.y:868:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 868 | pc->day = $1.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 46:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:868:41: 868 | pc->day = $1.value; | ^ | | | (22) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:868:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:868:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:868:41: | 868 | pc->day = $1.value; | | ^ | | | | | (39) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:868:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:868:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:868:41: | 868 | pc->day = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:868:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:868:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:868:41: | 868 | pc->day = $1.value; | | ^ | | | | | (82) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:868:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:868:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:868:41: | 868 | pc->day = $1.value; | | ^ | | | | | (96) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:868:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:869:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 869 | pc->month = $2; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 46:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:869:31: 869 | pc->month = $2; | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:869:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:869:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:869:31: | 869 | pc->month = $2; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:869:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:869:31: | 869 | pc->month = $2; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:869:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:869:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:869:31: | 869 | pc->month = $2; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:869:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:869:31: | 869 | pc->month = $2; | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:870:13: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 870 | if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 46:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:870:13: 870 | if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval.value' here gl/parse-datetime.y:870:13: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 46:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2174 || case 46: /* date: tUNUMBER tMONTH tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:870:13: | 870 | if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:876:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 876 | pc->month = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 47:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:876:31: 876 | pc->month = $1; | ^ | | | (22) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:876:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |104 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:876:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:876:31: | 876 | pc->month = $1; | | ^ | | | | | (39) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:876:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:876:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:876:31: | 876 | pc->month = $1; | | ^ | | | | | (36) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:876:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |104 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:876:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:876:31: | 876 | pc->month = $1; | | ^ | | | | | (82) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:876:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:876:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:876:31: | 876 | pc->month = $1; | | ^ | | | | | (96) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:876:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:877:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 47:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:877:13: 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:877:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:877:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:877:13: | 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:877:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:877:13: | 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:877:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:877:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:877:13: | 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:877:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:877:13: | 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:878:13: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 878 | if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 47:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': events 22-24 gl/parse-datetime.y:877:12: 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | ^ | | | (22) following 'false' branch... ->-+ | | | | |+-----------------------------------------------+ 878 || if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; || ~ ~ || | | || | (24) use of uninitialized value 'yyvsp_221->textintval.value' here |+------->(23) ...to here gl/parse-datetime.y:878:13: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 878 | if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 47:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2186 || case 47: /* date: tMONTH tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:877:12: | 877 | if (ckd_sub (&pc->day, 0, $2.value)) YYABORT; | | ^ | | | | | (36) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------------+ | 878 || if (ckd_sub (&pc->year.value, 0, $3.value)) YYABORT; | || ~ ~ | || | | | || | (38) use of uninitialized value 'yyvsp_221->textintval.value' here | |+------->(37) ...to here | gl/parse-datetime.y:883:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 883 | pc->month = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 48:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2198 || case 48: /* date: tMONTH tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:883:31: 883 | pc->month = $1; | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:883:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:883:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 48:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2198 || case 48: /* date: tMONTH tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:883:31: | 883 | pc->month = $1; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:883:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 48:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2198 || case 48: /* date: tMONTH tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:883:31: | 883 | pc->month = $1; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:883:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:883:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 48:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2198 || case 48: /* date: tMONTH tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:883:31: | 883 | pc->month = $1; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:883:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 48:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2198 || case 48: /* date: tMONTH tUNUMBER */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:883:31: | 883 | pc->month = $1; | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:884:40: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 884 | pc->day = $2.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 48:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2198 || case 48: /* date: tMONTH tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:884:40: 884 | pc->day = $2.value; | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval.value' here gl/parse-datetime.y:884:40: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 48:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2198 || case 48: /* date: tMONTH tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:884:40: | 884 | pc->day = $2.value; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:888:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 888 | pc->month = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 49:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:888:31: 888 | pc->month = $1; | ^ | | | (22) out-of-bounds read from byte -168 till byte -161 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:888:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |160 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:888:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:888:31: | 888 | pc->month = $1; | | ^ | | | | | (39) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:888:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |104 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:888:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:888:31: | 888 | pc->month = $1; | | ^ | | | | | (36) out-of-bounds read from byte -168 till byte -161 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:888:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +----------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||~+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+----+ +--------+-------+ |under-read of 8 bytes| |160 bytes| |size: 1120 bytes| +---------------------+ +---------+ +----------------+ gl/parse-datetime.y:888:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:888:31: | 888 | pc->month = $1; | | ^ | | | | | (82) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:888:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |104 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:888:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:888:31: | 888 | pc->month = $1; | | ^ | | | | | (96) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:888:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+----+ +--------+-------+ | |104 bytes| |size: 1120 bytes| | +---------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:889:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 889 | pc->day = $2.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 49:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:889:41: 889 | pc->day = $2.value; | ^ | | | (22) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:889:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:889:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:889:41: | 889 | pc->day = $2.value; | | ^ | | | | | (39) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:889:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:889:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:889:41: | 889 | pc->day = $2.value; | | ^ | | | | | (36) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:889:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:889:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:889:41: | 889 | pc->day = $2.value; | | ^ | | | | | (82) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:889:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:889:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:889:41: | 889 | pc->day = $2.value; | | ^ | | | | | (96) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:889:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:890:18: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 890 | pc->year = $4; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 49:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:890:18: 890 | pc->year = $4; | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval' here gl/parse-datetime.y:890:18: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 49:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2207 || case 49: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:890:18: | 890 | pc->year = $4; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval' here | gl/parse-datetime.y:894:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 894 | pc->day = $1.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 50:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2217 || case 50: /* date: tUNUMBER tMONTH */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:894:41: 894 | pc->day = $1.value; | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:894:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:894:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 50:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2217 || case 50: /* date: tUNUMBER tMONTH */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:894:41: | 894 | pc->day = $1.value; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:894:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 50:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2217 || case 50: /* date: tUNUMBER tMONTH */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:894:41: | 894 | pc->day = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:894:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:894:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 50:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2217 || case 50: /* date: tUNUMBER tMONTH */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:894:41: | 894 | pc->day = $1.value; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:894:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 50:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2217 || case 50: /* date: tUNUMBER tMONTH */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:894:41: | 894 | pc->day = $1.value; | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:895:30: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 895 | pc->month = $2; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 50:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2217 || case 50: /* date: tUNUMBER tMONTH */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:895:30: 895 | pc->month = $2; | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:895:30: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 50:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2217 || case 50: /* date: tUNUMBER tMONTH */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:895:30: | 895 | pc->month = $2; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:899:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 899 | pc->day = $1.value; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 51:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:899:41: 899 | pc->day = $1.value; | ^ | | | (22) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:899:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:899:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:899:41: | 899 | pc->day = $1.value; | | ^ | | | | | (39) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:899:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:899:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:899:41: | 899 | pc->day = $1.value; | | ^ | | | | | (36) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:899:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+-----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+-----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+~||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |96 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:899:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:899:41: | 899 | pc->day = $1.value; | | ^ | | | | | (82) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:899:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:899:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:899:41: | 899 | pc->day = $1.value; | | ^ | | | | | (96) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:899:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:900:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 900 | pc->month = $2; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 51:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:900:31: 900 | pc->month = $2; | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:900:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:900:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:900:31: | 900 | pc->month = $2; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:900:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:900:31: | 900 | pc->month = $2; | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:900:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:900:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:900:31: | 900 | pc->month = $2; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:900:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:900:31: | 900 | pc->month = $2; | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:901:18: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 901 | pc->year = $3; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 51:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:901:18: 901 | pc->year = $3; | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval' here gl/parse-datetime.y:901:18: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 51:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2226 || case 51: /* date: tUNUMBER tMONTH tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:901:18: | 901 | pc->year = $3; | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval' here | gl/parse-datetime.y:910:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 910 | pc->year = $1; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 53:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:910:18: 910 | pc->year = $1; | ^ | | | (22) out-of-bounds read from byte -112 till byte -89 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:910:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+---+ +--------+-------+ |under-read of 24 bytes| |88 bytes| |size: 1120 bytes| +----------------------+ +--------+ +----------------+ gl/parse-datetime.y:910:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:910:18: | 910 | pc->year = $1; | | ^ | | | | | (39) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:910:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+---+ +--------+-------+ |under-read of 24 bytes| |32 bytes| |size: 1120 bytes| +----------------------+ +--------+ +----------------+ gl/parse-datetime.y:910:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:910:18: | 910 | pc->year = $1; | | ^ | | | | | (36) out-of-bounds read from byte -112 till byte -89 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:910:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+---+ +--------+-------+ |under-read of 24 bytes| |88 bytes| |size: 1120 bytes| +----------------------+ +--------+ +----------------+ gl/parse-datetime.y:910:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:910:18: | 910 | pc->year = $1; | | ^ | | | | | (82) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:910:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+---+ +--------+-------+ |under-read of 24 bytes| |32 bytes| |size: 1120 bytes| +----------------------+ +--------+ +----------------+ gl/parse-datetime.y:910:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:910:18: | 910 | pc->year = $1; | | ^ | | | | | (96) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:910:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+---+ +--------+-------+ |under-read of 24 bytes| |32 bytes| |size: 1120 bytes| +----------------------+ +--------+ +----------------+ gl/parse-datetime.y:911:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 53:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:911:13: 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:911:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:911:13: | 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:911:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:911:13: | 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:911:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:911:13: | 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:911:13: | 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:912:13: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 912 | if (ckd_sub (&pc->day, 0, $3.value)) YYABORT; | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 53:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': events 22-24 gl/parse-datetime.y:911:12: 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | ^ | | | (22) following 'false' branch... ->-+ | | | | |+-----------------------------------------------+ 912 || if (ckd_sub (&pc->day, 0, $3.value)) YYABORT; || ~ ~ || | | || | (24) use of uninitialized value 'yyvsp_221->textintval.value' here |+------->(23) ...to here gl/parse-datetime.y:912:13: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 912 | if (ckd_sub (&pc->day, 0, $3.value)) YYABORT; | ^ 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 53:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2236 || case 53: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': events 36-38 | |gl/parse-datetime.y:911:12: | 911 | if (ckd_sub (&pc->month, 0, $2.value)) YYABORT; | | ^ | | | | | (36) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------------+ | 912 || if (ckd_sub (&pc->day, 0, $3.value)) YYABORT; | || ~ ~ | || | | | || | (38) use of uninitialized value 'yyvsp_221->textintval.value' here | |+------->(37) ...to here | gl/parse-datetime.y:918:15: warning: use of uninitialized value '_136->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 918 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | ^ 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 54:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2247 || case 54: /* rel: relunit tAGO */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:918:15: | 918 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (39) use of uninitialized value '_136->rel' here | gl/parse-datetime.y:918:15: warning: use of uninitialized value '_136->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 54:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2247 || case 54: /* rel: relunit tAGO */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:918:15: | 918 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (82) use of uninitialized value '_136->rel' here | gl/parse-datetime.y:918:15: warning: use of uninitialized value '_136->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 54:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2247 || case 54: /* rel: relunit tAGO */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:918:15: | 918 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (96) use of uninitialized value '_136->rel' here | gl/parse-datetime.y:918:66: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 918 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 54:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2247 || case 54: /* rel: relunit tAGO */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:918:66: 918 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:918:66: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 54:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2247 || case 54: /* rel: relunit tAGO */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:918:66: | 918 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:920:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 920 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 55:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2253 || case 55: /* rel: relunit */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:920:15: 920 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->rel' here gl/parse-datetime.y:920:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 55:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2253 || case 55: /* rel: relunit */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:920:15: | 920 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->rel' here | gl/parse-datetime.y:922:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 922 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 56:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2259 || case 56: /* rel: dayshift */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:922:15: 922 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->rel' here gl/parse-datetime.y:922:15: warning: use of uninitialized value 'yyvsp_221->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 56:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2259 || case 56: /* rel: dayshift */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:922:15: | 922 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->rel' here | gl/parse-datetime.y:927:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 927 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 57:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2265 || case 57: /* relunit: tORDINAL tYEAR_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:927:69: 927 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:927:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:927:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 57:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2265 || case 57: /* relunit: tORDINAL tYEAR_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:927:69: | 927 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:927:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 57:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2265 || case 57: /* relunit: tORDINAL tYEAR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:927:69: | 927 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:927:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:927:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 57:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2265 || case 57: /* relunit: tORDINAL tYEAR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:927:69: | 927 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:927:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 57:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2265 || case 57: /* relunit: tORDINAL tYEAR_UNIT */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:927:69: | 927 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:929:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 929 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 58:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2271 || case 58: /* relunit: tUNUMBER tYEAR_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:929:81: 929 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:929:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:929:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 58:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2271 || case 58: /* relunit: tUNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:929:81: | 929 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:929:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 58:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2271 || case 58: /* relunit: tUNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:929:81: | 929 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:929:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:929:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 58:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2271 || case 58: /* relunit: tUNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:929:81: | 929 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:929:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 58:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2271 || case 58: /* relunit: tUNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:929:81: | 929 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:933:70: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 933 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 60:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2283 || case 60: /* relunit: tORDINAL tMONTH_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:933:70: 933 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:933:70: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:933:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 60:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2283 || case 60: /* relunit: tORDINAL tMONTH_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:933:70: | 933 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:933:70: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 60:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2283 || case 60: /* relunit: tORDINAL tMONTH_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:933:70: | 933 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:933:70: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:933:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 60:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2283 || case 60: /* relunit: tORDINAL tMONTH_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:933:70: | 933 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:933:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 60:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2283 || case 60: /* relunit: tORDINAL tMONTH_UNIT */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:933:70: | 933 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:935:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 935 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 61:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2289 || case 61: /* relunit: tUNUMBER tMONTH_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:935:82: 935 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:935:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:935:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 61:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2289 || case 61: /* relunit: tUNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:935:82: | 935 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:935:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 61:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2289 || case 61: /* relunit: tUNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:935:82: | 935 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:935:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:935:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 61:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2289 || case 61: /* relunit: tUNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:935:82: | 935 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:935:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 61:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2289 || case 61: /* relunit: tUNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:935:82: | 935 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:940:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 63:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2301 || case 63: /* relunit: tORDINAL tDAY_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:940:13: 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:940:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:940:13: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 63:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2301 || case 63: /* relunit: tORDINAL tDAY_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:940:13: 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:940:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 63:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2301 || case 63: /* relunit: tORDINAL tDAY_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:940:13: | 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:940:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 63:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2301 || case 63: /* relunit: tORDINAL tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:940:13: | 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:940:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:940:13: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 63:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2301 || case 63: /* relunit: tORDINAL tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:940:13: | 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:940:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 63:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2301 || case 63: /* relunit: tORDINAL tDAY_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:940:13: | 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:940:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 63:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2301 || case 63: /* relunit: tORDINAL tDAY_UNIT */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:940:13: | 940 | if (ckd_mul (&$$.day, $1, $2)) YYABORT; } | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:943:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 64:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2308 || case 64: /* relunit: tUNUMBER tDAY_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:943:13: 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:943:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:943:13: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 64:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2308 || case 64: /* relunit: tUNUMBER tDAY_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:943:13: 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:943:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 64:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2308 || case 64: /* relunit: tUNUMBER tDAY_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:943:13: | 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:943:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 64:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2308 || case 64: /* relunit: tUNUMBER tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:943:13: | 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:943:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:943:13: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 64:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2308 || case 64: /* relunit: tUNUMBER tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:943:13: | 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:943:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 64:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2308 || case 64: /* relunit: tUNUMBER tDAY_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:943:13: | 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:943:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 64:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2308 || case 64: /* relunit: tUNUMBER tDAY_UNIT */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:943:13: | 943 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:945:67: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 945 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 65:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2315 || case 65: /* relunit: tDAY_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:945:67: 945 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:945:67: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 65:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2315 || case 65: /* relunit: tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:945:67: | 945 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:947:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 947 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 66:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2321 || case 66: /* relunit: tORDINAL tHOUR_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:947:69: 947 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:947:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:947:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 66:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2321 || case 66: /* relunit: tORDINAL tHOUR_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:947:69: | 947 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:947:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 66:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2321 || case 66: /* relunit: tORDINAL tHOUR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:947:69: | 947 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:947:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:947:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 66:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2321 || case 66: /* relunit: tORDINAL tHOUR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:947:69: | 947 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:947:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 66:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2321 || case 66: /* relunit: tORDINAL tHOUR_UNIT */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:947:69: | 947 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:949:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 949 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 67:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2327 || case 67: /* relunit: tUNUMBER tHOUR_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:949:81: 949 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:949:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:949:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 67:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2327 || case 67: /* relunit: tUNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:949:81: | 949 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:949:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 67:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2327 || case 67: /* relunit: tUNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:949:81: | 949 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:949:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:949:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 67:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2327 || case 67: /* relunit: tUNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:949:81: | 949 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:949:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 67:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2327 || case 67: /* relunit: tUNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:949:81: | 949 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:953:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 69:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2339 || case 69: /* relunit: tORDINAL tMINUTE_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:953:72: 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:953:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:953:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 69:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2339 || case 69: /* relunit: tORDINAL tMINUTE_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:953:72: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:953:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 69:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2339 || case 69: /* relunit: tORDINAL tMINUTE_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:953:72: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:953:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:953:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 69:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2339 || case 69: /* relunit: tORDINAL tMINUTE_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:953:72: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:953:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 69:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2339 || case 69: /* relunit: tORDINAL tMINUTE_UNIT */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:953:72: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:955:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 955 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 70:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2345 || case 70: /* relunit: tUNUMBER tMINUTE_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:955:84: 955 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:955:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 70:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2345 || case 70: /* relunit: tUNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:955:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 70:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2345 || case 70: /* relunit: tUNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:955:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 70:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2345 || case 70: /* relunit: tUNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 70:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2345 || case 70: /* relunit: tUNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:959:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 959 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 72:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2357 || case 72: /* relunit: tORDINAL tSEC_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:959:72: 959 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:959:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:959:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 72:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2357 || case 72: /* relunit: tORDINAL tSEC_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:959:72: | 959 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:959:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 72:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2357 || case 72: /* relunit: tORDINAL tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:959:72: | 959 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:959:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:959:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 72:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2357 || case 72: /* relunit: tORDINAL tSEC_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:959:72: | 959 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:959:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 72:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2357 || case 72: /* relunit: tORDINAL tSEC_UNIT */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:959:72: | 959 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].intval' here | gl/parse-datetime.y:961:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 961 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 73:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2363 || case 73: /* relunit: tUNUMBER tSEC_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:961:84: 961 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:961:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:961:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 73:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2363 || case 73: /* relunit: tUNUMBER tSEC_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:961:84: | 961 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:961:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 73:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2363 || case 73: /* relunit: tUNUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:961:84: | 961 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:961:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:961:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 73:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2363 || case 73: /* relunit: tUNUMBER tSEC_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:961:84: | 961 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:961:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 73:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2363 || case 73: /* relunit: tUNUMBER tSEC_UNIT */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:961:84: | 961 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:963:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 74:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2369 || case 74: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:963:82: 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:963:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:963:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 74:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2369 || case 74: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:963:82: | 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:963:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 74:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2369 || case 74: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:963:82: | 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:963:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:963:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 74:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2369 || case 74: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:963:82: | 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:963:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 74:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2369 || case 74: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:963:82: | 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:963:128: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 74:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2369 || case 74: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:963:128: 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:963:128: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:963:128: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 74:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2369 || case 74: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:963:128: | 963 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:963:128: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:965:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 75:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2375 || case 75: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:965:82: 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ | | | (22) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:965:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:965:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 75:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2375 || case 75: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:965:82: | 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:965:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 75:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2375 || case 75: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:965:82: | 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:965:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of '__time_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |48 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:965:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 75:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2375 || case 75: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:965:82: | 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:965:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 75:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2375 || case 75: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:965:82: | 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:965:128: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 75:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2375 || case 75: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:965:128: 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:965:128: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:965:128: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 75:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2375 || case 75: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:965:128: | 965 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:965:128: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-------------------------------------+ |read of '__syscall_slong_t' (8 bytes)| +-------------------------------------+ ^ | | +-------------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-------------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +----------+----------+ +----+---+ +--------+-------+ |under-read of 8 bytes| |40 bytes| |size: 1120 bytes| +---------------------+ +--------+ +----------------+ gl/parse-datetime.y:973:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 973 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 78:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2387 || case 78: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:973:81: 973 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:973:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:973:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 78:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2387 || case 78: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:973:81: | 973 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:973:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 78:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2387 || case 78: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:973:81: | 973 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:973:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:973:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 78:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2387 || case 78: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:973:81: | 973 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:973:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 78:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2387 || case 78: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:973:81: | 973 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:975:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 975 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 79:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2393 || case 79: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:975:82: 975 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:975:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:975:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 79:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2393 || case 79: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:975:82: | 975 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:975:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 79:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2393 || case 79: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:975:82: | 975 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:975:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:975:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 79:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2393 || case 79: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:975:82: | 975 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:975:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 79:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2393 || case 79: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:975:82: | 975 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:978:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 80:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2399 || case 80: /* relunit_snumber: tSNUMBER tDAY_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:978:13: 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:978:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:978:13: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 80:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2399 || case 80: /* relunit_snumber: tSNUMBER tDAY_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:978:13: 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:978:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 80:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2399 || case 80: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:978:13: | 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:978:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 80:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2399 || case 80: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:978:13: | 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:978:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:978:13: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 80:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2399 || case 80: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:978:13: | 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:978:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 80:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2399 || case 80: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:978:13: | 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:978:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 80:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2399 || case 80: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:978:13: | 978 | if (ckd_mul (&$$.day, $1.value, $2)) YYABORT; } | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:980:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 980 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 81:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2406 || case 81: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:980:81: 980 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:980:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:980:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 81:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2406 || case 81: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:980:81: | 980 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:980:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 81:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2406 || case 81: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:980:81: | 980 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:980:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:980:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 81:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2406 || case 81: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:980:81: | 980 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:980:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 81:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2406 || case 81: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:980:81: | 980 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:982:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 982 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 82:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2412 || case 82: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:982:84: 982 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:982:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:982:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 82:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2412 || case 82: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:982:84: | 982 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:982:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 82:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2412 || case 82: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:982:84: | 982 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:982:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:982:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 82:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2412 || case 82: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:982:84: | 982 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:982:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 82:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2412 || case 82: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:982:84: | 982 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:984:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 984 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 83:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2418 || case 83: /* relunit_snumber: tSNUMBER tSEC_UNIT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:984:84: 984 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | ^ | | | (22) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:984:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:984:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 83:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2418 || case 83: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:984:84: | 984 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (39) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:984:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 83:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2418 || case 83: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:984:84: | 984 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (36) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:984:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +----------------------------+ |read of 'intmax_t' (8 bytes)| +----------------------------+ ^ | | +----------------------------+ +----------+------------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+------------+-------------+ | | | 'yyvsa' (type: 'union YYSTYPE[20]') | +----------------------------+ +-------------------------------------+ |~~~~~~~~~~~~~+~~~~~~~~~~~~~~||+||~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~| | | | | +----+---+ +--------+-------+ | |40 bytes| |size: 1120 bytes| | +--------+ +----------------+ +----------+----------+ |under-read of 8 bytes| +---------------------+ gl/parse-datetime.y:984:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 83:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2418 || case 83: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:984:84: | 984 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (82) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:984:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 83:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2418 || case 83: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:984:84: | 984 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (96) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_221 + -56B].textintval.value' here | gl/parse-datetime.y:989:67: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 989 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 84:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2424 || case 84: /* dayshift: tDAY_SHIFT */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:989:67: 989 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->intval' here gl/parse-datetime.y:989:67: warning: use of uninitialized value 'yyvsp_221->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 84:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2424 || case 84: /* dayshift: tDAY_SHIFT */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:989:67: | 989 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->intval' here | gl/parse-datetime.y:998:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 998 | $$ = (struct timespec) { .tv_sec = $1.value }; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 88:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2430 || case 88: /* signed_seconds: tSNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:998:79: 998 | $$ = (struct timespec) { .tv_sec = $1.value }; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval.value' here gl/parse-datetime.y:998:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 88:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2430 || case 88: /* signed_seconds: tSNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:998:79: | 998 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (39) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:998:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 88:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2430 || case 88: /* signed_seconds: tSNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:998:79: | 998 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:998:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 88:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2430 || case 88: /* signed_seconds: tSNUMBER */ | || ~ | || | | |+->(87) ...to here | 'yyparse': event 88 | |gl/parse-datetime.y:998:79: | 998 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (88) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:998:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (76) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 77-80 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (77) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (78) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (80) following 'true' branch (when the strings are equal)... ->-+ | |+--->(79) ...to here | | | | | 'lookup_word': event 81 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(81) ...to here | <------+ | 'yylex': events 82-84 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (82) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (83) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(84) ...to here | <------+ | 'yyparse': events 85-90 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (85) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (86) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(87) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (88) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (90) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(89) ...to here | | | | | 'yyparse': events 91-92 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (92) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(91) ...to here | 'yyparse': events 93-101 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(93) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (94) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(95) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (96) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(97) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (98) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(99) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (100) following 'case 88:' branch... ->-+ | | | |...... | | | | |+------------------------------------------+ | 2430 || case 88: /* signed_seconds: tSNUMBER */ | || ~ | || | | |+->(101) ...to here | 'yyparse': event 102 | |gl/parse-datetime.y:998:79: | 998 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (102) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1005:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1005 | $$ = (struct timespec) { .tv_sec = $1.value }; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 90:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2437 || case 90: /* unsigned_seconds: tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:1005:79: 1005 | $$ = (struct timespec) { .tv_sec = $1.value }; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval.value' here gl/parse-datetime.y:1005:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 90:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2437 || case 90: /* unsigned_seconds: tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:1005:79: | 1005 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (39) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1005:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 90:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2437 || case 90: /* unsigned_seconds: tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:1005:79: | 1005 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1005:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 90:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2437 || case 90: /* unsigned_seconds: tUNUMBER */ | || ~ | || | | |+->(87) ...to here | 'yyparse': event 88 | |gl/parse-datetime.y:1005:79: | 1005 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (88) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1005:79: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (76) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 77-80 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (77) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (78) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (80) following 'true' branch (when the strings are equal)... ->-+ | |+--->(79) ...to here | | | | | 'lookup_word': event 81 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(81) ...to here | <------+ | 'yylex': events 82-84 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (82) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (83) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(84) ...to here | <------+ | 'yyparse': events 85-90 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (85) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (86) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(87) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (88) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (90) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(89) ...to here | | | | | 'yyparse': events 91-92 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (92) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(91) ...to here | 'yyparse': events 93-101 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(93) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (94) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(95) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (96) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(97) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (98) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(99) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (100) following 'case 90:' branch... ->-+ | | | |...... | | | | |+------------------------------------------+ | 2437 || case 90: /* unsigned_seconds: tUNUMBER */ | || ~ | || | | |+->(101) ...to here | 'yyparse': event 102 | |gl/parse-datetime.y:1005:79: | 1005 | $$ = (struct timespec) { .tv_sec = $1.value }; } | | ^ | | | | | (102) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1010:9: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1010 | { digits_to_date_time (pc, $1); } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 91:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2444 || case 91: /* number: tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:1010:9: 1010 | { digits_to_date_time (pc, $1); } | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval' here gl/parse-datetime.y:1010:9: warning: use of uninitialized value 'yyvsp_221->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 91:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2444 || case 91: /* number: tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:1010:9: | 1010 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval' here | gl/parse-datetime.y:1018:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 1018 | digits_to_date_time (pc, $1); | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) capacity: 1120 bytes ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 92:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2450 || case 92: /* hybrid: tUNUMBER relunit_snumber */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:1018:9: 1018 | digits_to_date_time (pc, $1); | ^ | | | (22) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 gl/parse-datetime.y:1018:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+---+ +--------+-------+ |under-read of 24 bytes| |32 bytes| |size: 1120 bytes| +----------------------+ +--------+ +----------------+ gl/parse-datetime.y:1018:9: warning: use of uninitialized value '_180->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 92:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2450 || case 92: /* hybrid: tUNUMBER relunit_snumber */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:1018:9: | 1018 | digits_to_date_time (pc, $1); | | ^ | | | | | (39) use of uninitialized value '_180->textintval' here | gl/parse-datetime.y:1018:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) capacity: 1120 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 92:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2450 || case 92: /* hybrid: tUNUMBER relunit_snumber */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:1018:9: | 1018 | digits_to_date_time (pc, $1); | | ^ | | | | | (36) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:1018:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' +-----------------------------------+ |read of 'struct textint' (24 bytes)| +-----------------------------------+ ^ | | +-----------------------------------+ +----------+----------+-------------+ | | | [0] | ... | [19] | | before valid range | +----------+----------+-------------+ | | |'yyvsa' (type: 'union YYSTYPE[20]')| +-----------------------------------+ +-----------------------------------+ |~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~||||~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~| | | | +-----------+----------+ +----+---+ +--------+-------+ |under-read of 24 bytes| |32 bytes| |size: 1120 bytes| +----------------------+ +--------+ +----------------+ gl/parse-datetime.y:1018:9: warning: use of uninitialized value '_180->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (62) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 63-64 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (63) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(64) ...to here | <-------------+ | 'yyparse': events 65-70 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (65) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(67) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (70) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(69) ...to here | | | | | 'yyparse': events 71-72 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (72) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(71) ...to here | 'yyparse': events 73-81 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(73) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (74) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(75) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (76) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(77) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (78) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(79) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (80) following 'case 92:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2450 || case 92: /* hybrid: tUNUMBER relunit_snumber */ | || ~ | || | | |+->(81) ...to here | 'yyparse': event 82 | |gl/parse-datetime.y:1018:9: | 1018 | digits_to_date_time (pc, $1); | | ^ | | | | | (82) use of uninitialized value '_180->textintval' here | gl/parse-datetime.y:1018:9: warning: use of uninitialized value '_180->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (76) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 77-78 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (77) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(78) ...to here | <-------------+ | 'yyparse': events 79-84 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (79) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (80) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(81) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (84) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(83) ...to here | | | | | 'yyparse': events 85-86 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (86) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(85) ...to here | 'yyparse': events 87-95 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(87) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (88) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(89) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (90) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(91) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (92) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(93) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (94) following 'case 92:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2450 || case 92: /* hybrid: tUNUMBER relunit_snumber */ | || ~ | || | | |+->(95) ...to here | 'yyparse': event 96 | |gl/parse-datetime.y:1018:9: | 1018 | digits_to_date_time (pc, $1); | | ^ | | | | | (96) use of uninitialized value '_180->textintval' here | gl/parse-datetime.y:1027:47: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1027 | { $$ = $2.value; } | ^ 'yyparse': events 1-2 gl/parse-datetime.c:1622:13: 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | ^ | | | (1) region created on stack here ...... 1670 | if (yyss + yystacksize - 1 <= yyssp) | ~ | | | (2) following 'false' branch... ->-+ | | 'yyparse': events 3-14 | | |+----------------------------------------+ 1670 || if (yyss + yystacksize - 1 <= yyssp) || ^ || | |+---->(3) ...to here ...... 1734 | if (yystate == YYFINAL) | ~ | | | (4) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | ...... | | |+-------------------------------------------------------------------+ 1737 || goto yybackup; || ~ || | |+->(5) ...to here ...... 1749 | if (yypact_value_is_default (yyn)) | ~ | | | (6) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | ...... | | |+----------------------------------------------------------------+ 1755 || if (yychar == YYEMPTY) || ~ ~ || | | || | (8) following 'true' branch (when 'yychar_197 == -2')... ->-+ |+->(7) ...to here | | | | | |+-----------------------------------------------------------------+ 1756 || { 1757 || YYDPRINTF ((stderr, "Reading a token\n")); || ~ || | |+----->(9) ...to here ...... 1761 | if (yychar <= YYEOF) | ~ | | | (10) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | ...... | | |+-----------------------------------------------------------------+ 1767 || else if (yychar == YYerror) || ~ ~ || | | || | (12) following 'false' branch (when 'yychar_198 != 256')... ->-+ |+------>(11) ...to here | | | ...... | | |+-------------------------------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ~ ~ || | | || | (14) following 'true' branch... ->-+ |+----->(13) ...to here | | | 'yyparse': events 15-21 | | |+---------------------------------------------------+ 1779 || yytoken = YYTRANSLATE (yychar); || ^ || | |+--------------->(15) ...to here ...... 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ~ | | | (16) following 'false' branch... ->-+ | | | | |+-----------------------------------------+ 1787 || goto yydefault; 1788 || yyn = yytable[yyn]; || ~ || | |+->(17) ...to here 1789 | if (yyn <= 0) | ~ | | | (18) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | |+--------------------------------------------------------------+ 1790 || { 1791 || if (yytable_value_is_error (yyn)) || ~ || | |+----->(19) ...to here ...... 1843 | switch (yyn) | ~ | | | (20) following 'case 94:' branch... ->-+ | | ...... | | |+-----------------------------------------+ 2467 || case 94: /* o_colon_minutes: ':' tUNUMBER */ || ~ || | |+->(21) ...to here 'yyparse': event 22 gl/parse-datetime.y:1027:47: 1027 | { $$ = $2.value; } | ^ | | | (22) use of uninitialized value 'yyvsp_221->textintval.value' here gl/parse-datetime.y:1027:47: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-3 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (2) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (3) following 'false' branch... ->-+ | | | | 'yyparse': events 4-11 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(4) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (5) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(6) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (7) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (9) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(8) ...to here | | | | | | | | |+-----------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(10) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (11) calling 'yylex' from 'yyparse' | +--> 'yylex': events 12-13 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (12) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (13) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 14-17 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (14) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (15) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (17) following 'true' branch (when the strings are equal)... ->-+ | |+--->(16) ...to here | | | | | 'lookup_word': event 18 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(18) ...to here | <------+ | 'yylex': events 19-21 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (19) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (20) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(21) ...to here | <------+ | 'yyparse': events 22-27 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (22) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (23) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(24) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (25) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (27) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(26) ...to here | | | | | 'yyparse': events 28-29 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (29) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(28) ...to here | 'yyparse': events 30-38 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(30) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (31) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(32) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (33) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(34) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (35) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(36) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (37) following 'case 94:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2467 || case 94: /* o_colon_minutes: ':' tUNUMBER */ | || ~ | || | | |+->(38) ...to here | 'yyparse': event 39 | |gl/parse-datetime.y:1027:47: | 1027 | { $$ = $2.value; } | | ^ | | | | | (39) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1027:47: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-6 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-16 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (15) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (16) following 'false' branch... ->-+ | | | | 'yyparse': events 17-28 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(17) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (18) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(19) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (20) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (22) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(21) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(23) ...to here |...... | 1761 | if (yychar <= YYEOF) | | ~ | | | | | (24) following 'false' branch (when 'yychar_198 > 0')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1767 || else if (yychar == YYerror) | || ~ ~ | || | | | || | (26) following 'false' branch (when 'yychar_198 != 256')... ->-+ | |+------>(25) ...to here | | | | |...... | | | | |+-------------------------------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ~ ~ | || | | | || | (28) following 'true' branch... ->-+ | |+----->(27) ...to here | | | | | 'yyparse': events 29-35 | | | | | |+---------------------------------------------------+ | 1779 || yytoken = YYTRANSLATE (yychar); | || ^ | || | | |+--------------->(29) ...to here |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (30) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(31) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (32) following 'true' branch (when 'yyn_245 <= 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1790 || { | 1791 || if (yytable_value_is_error (yyn)) | || ~ | || | | |+----->(33) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (34) following 'case 94:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2467 || case 94: /* o_colon_minutes: ':' tUNUMBER */ | || ~ | || | | |+->(35) ...to here | 'yyparse': event 36 | |gl/parse-datetime.y:1027:47: | 1027 | { $$ = $2.value; } | | ^ | | | | | (36) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1027:47: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(5) ...to here |...... | 107 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | | | | |+----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (11) calling 'parse_datetime_body' from 'parse_datetime' | |+->(10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-20 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (19) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(20) ...to here | 'set_tz': event 21 | | 216 | if (env_tz | | ^ | | | | | (21) following 'true' branch... ->-+ | | | | 'set_tz': event 22 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(22) ...to here | <------+ | 'localtime_rz': events 23-26 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (23) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(25) ...to here (26) following 'true' branch... ->-+ | | | | 'localtime_rz': events 27-28 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(27) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (28) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 29-30 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (29) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (30) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 31 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(31) ...to here | <------+ | 'localtime_rz': event 32 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (32) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 33 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (33) following 'true' branch... ->-+ | | | | 'localtime_rz': event 34 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(34) ...to here | <------+ | 'parse_datetime_body': event 35 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (35) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 36-40 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (36) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(37) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (38) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(39) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (40) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 41-42 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (41) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (42) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 43 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(43) ...to here | <------+ | 'parse_datetime_body': events 44-49 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (44) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (45) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(46) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (47) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (49) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(48) ...to here | +--> 'yyparse': events 50-52 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (50) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (51) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | | 'yyparse': events 53-60 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(53) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (54) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(55) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (56) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (58) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(57) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(59) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (60) calling 'yylex' from 'yyparse' | +--> 'yylex': events 61-62 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (61) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (62) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 63-66 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (63) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (64) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (66) following 'true' branch (when the strings are equal)... ->-+ | |+--->(65) ...to here | | | | | 'lookup_word': event 67 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(67) ...to here | <------+ | 'yylex': events 68-70 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (68) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (69) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(70) ...to here | <------+ | 'yyparse': events 71-76 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (71) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (72) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(73) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (74) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (76) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(75) ...to here | | | | | 'yyparse': events 77-78 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (78) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(77) ...to here | 'yyparse': events 79-87 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(79) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (80) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(81) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (82) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(83) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (84) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(85) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (86) following 'case 94:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 2467 || case 94: /* o_colon_minutes: ':' tUNUMBER */ | || ~ | || | | |+->(87) ...to here | 'yyparse': event 88 | |gl/parse-datetime.y:1027:47: | 1027 | { $$ = $2.value; } | | ^ | | | | | (88) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.y:1027:47: warning: use of uninitialized value 'yyvsp_221->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2620:8: | 2620 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2621 | { | 2622 | return get_int_date(cfg.next_update_date, cfg.crl_next_update, | | ~ | | | | | (2) calling 'get_int_date' from 'get_crl_next_update' | +--> 'get_int_date': events 3-8 | | 1788 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1789 | { | 1790 | if (batch) { | | ~ | | | | | (4) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------+ | 1791 || if (txt_val == NULL) { | || ~ ~ | || | | | || | (6) following 'false' branch (when 'txt_val_11(D)' is non-NULL)... ->-+ | |+--------------->(5) ...to here | | | | |...... | | | | |+-----------------------------------------------------------------------------------------+ | 1802 || return get_date(txt_val); | || ~ ~ | || | | | || | (8) calling 'get_date' from 'get_int_date' | |+----------------------->(7) ...to here | +--> 'get_date': events 9-10 | | 1707 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1711 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ | | | | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... ->-+ | | | | 'get_date': events 11-12 | | | | | |+------------------------------------------------------------------------------+ | 1711 || if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | || ^ | || | | |+--------------------------->(11) ...to here | | (12) calling 'parse_datetime' from 'get_date' | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2425:1: | 2425 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2429 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:1057:1: | 1057 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:102:6: | 102 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... ->-+ | | | | | | | |+-------------------------------------------------------------------+ | 103 || { | 104 || tz->next = NULL; | || ~ | || | | |+----->(17) ...to here |...... | 107 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 110 || return tz; | || ~ | || | | |+->(19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2429:19: | 2429 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2430 | if (!tz) | | ~ | | | | | (21) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 2431 || return false; | 2432 || bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | || ~ ~ | || | | | || | (23) calling 'parse_datetime_body' from 'parse_datetime' | |+->(22) ...to here | +--> 'parse_datetime_body': events 24-27 | | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1785 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_201(D)' is NULL)... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 1786 || { | 1787 || gettime (&gettime_buffer); | || ~ | || | | |+----->(26) ...to here |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:1095:1: | 1095 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:273:6: | 273 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... ->-+ | | | |...... | | | | |+----------------------------------------------------------------------+ | 277 || timezone_t old_tz = set_tz (tz); | || ~ ~ | || | | | |+----->(30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-34 | | 213 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 216 | if (env_tz | | ~ | | | | | (33) following 'false' branch... ->-+ | | | | | | | |+------------------------------------------+ | 217 || ? tz->tz_is_set && streq (tz->abbrs, env_tz) | 218 || : !tz->tz_is_set) | || ~ | || | | |+---------->(34) ...to here | 'set_tz': event 35 | | 216 | if (env_tz | | ^ | | | | | (35) following 'true' branch... ->-+ | | | | 'set_tz': event 36 | | | | | |+----------------------------------------+ | 216 || if (env_tz | || ^ | || | | |+---->(36) ...to here | <------+ | 'localtime_rz': events 37-40 | | 277 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (37) returning to 'localtime_rz' from 'set_tz' | 278 | if (old_tz) | | ~ | | | | | (38) following 'true' branch... ->-+ | | | | | | | |+--------------------------------------------+ | 279 || { | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ~ ~ | || | | | |+--------->(39) ...to here (40) following 'true' branch... ->-+ | | | | 'localtime_rz': events 41-42 | | | | | |+-----------------------------------------------------------------------------------+ | 280 || bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | || ^ | || | | |+-------------->(41) ...to here | 281 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (42) calling 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': events 43-44 | | 238 | revert_tz (timezone_t tz) | | ^ | | | | | (43) entry to 'revert_tz' | 239 | { | 240 | if (tz == local_tz) | | ~ | | | | | (44) following 'true' branch (when 'tz_5(D) == 1B')... ->-+ | | | | 'revert_tz': event 45 | | | | | |+---------------------------------------------------------------+ | 240 || if (tz == local_tz) | || ^ | || | | |+---->(45) ...to here | <------+ | 'localtime_rz': event 46 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (46) returning to 'localtime_rz' from 'revert_tz' | 'localtime_rz': event 47 | | 281 | if (revert_tz (old_tz) && abbr_saved) | | ^ | | | | | (47) following 'true' branch... ->-+ | | | | 'localtime_rz': event 48 | | | | | |+------------------------------------------------+ | 281 || if (revert_tz (old_tz) && abbr_saved) | || ^ | || | | |+-------------------------------->(48) ...to here | <------+ | 'parse_datetime_body': event 49 | |gl/parse-datetime.y:1849:9: | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (49) returning to 'parse_datetime_body' from 'localtime_rz' | 'parse_datetime_body': events 50-54 | | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ^ | | | | | (50) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(51) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (52) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(53) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (54) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 55-56 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (55) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (56) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 57 | | | | | |+-----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(57) ...to here | <------+ | 'parse_datetime_body': events 58-63 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (58) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (59) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(60) ...to here | 1906 | if (ckd_add (&probe, Start, quarter * (90 * 24 * 60 * 60))) | | ~ | | | | | (61) following 'true' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 1931 || if (yyparse (&pc) != 0) | || ~ | || | | || (63) calling 'yyparse' from 'parse_datetime_body' |...... | 2405 ||} | ||~ | ||| | |+(62) ...to here | +--> 'yyparse': events 64-66 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (64) entry to 'yyparse' |...... | 1622 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (65) region created on stack here |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (66) following 'false' branch... ->-+ | | | | 'yyparse': events 67-74 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(67) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (68) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(69) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (70) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (72) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(71) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(73) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (74) calling 'yylex' from 'yyparse' | +--> 'yylex': events 75-76 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (75) entry to 'yylex' |...... | 1562 | tp = lookup_word (pc, buff); | | ~ | | | | | (76) calling 'lookup_word' from 'yylex' | +--> 'lookup_word': events 77-80 | | 1372 | lookup_word (parser_control const *pc, char *word) | | ^ | | | | | (77) entry to 'lookup_word' |...... | 1385 | for (tp = meridian_table; tp->name; tp++) | | ~ | | | | | (78) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ~ ~ | || | | | || | (80) following 'true' branch (when the strings are equal)... ->-+ | |+--->(79) ...to here | | | | | 'lookup_word': event 81 | | | | | |+-----------------------------------------------------------------------+ | 1386 || if (streq (word, tp->name)) | || ^ | || | | |+------>(81) ...to here | <------+ | 'yylex': events 82-84 | | 1562 | tp = lookup_word (pc, buff); | | ^ | | | | | (82) returning to 'yylex' from 'lookup_word' | 1563 | if (! tp) | | ~ | | | | | (83) following 'false' branch... ->-+ | | | |...... | | | | |+-------------------------------------------------+ | 1569 || lvalp->intval = tp->value; | || ~ | || | | |+--------->(84) ...to here | <------+ | 'yyparse': events 85-90 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (85) returning to 'yyparse' from 'yylex' |...... | 1786 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (86) following 'false' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 1787 || goto yydefault; | 1788 || yyn = yytable[yyn]; | || ~ | || | | |+->(87) ...to here | 1789 | if (yyn <= 0) | | ~ | | | | | (88) following 'false' branch (when 'yyn_245 > 0')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------+ | 1799 || if (yyerrstatus) | || ~ ~ | || | | | || | (90) following 'false' branch (when 'yyerrstatus_214 == 0')... ->-+ | |+->(89) ...to here | | | | | 'yyparse': events 91-92 | | | | | |+-----------------------------------------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ~ | || | | || (92) following 'false' branch... ->-+ | || | |...... | || | | |+-----------------------------------------+ | 1799 || if (yyerrstatus) | || ^ | || | | |+---->(91) ...to here | 'yyparse': events 93-101 | | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | |+---->(93) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (94) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(95) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (96) following 'true' branch (when 'yyn_240 == -93')... ->-+ | | | | | | | |+----------------------------------------------------------------+ | 1750 || goto yydefault; | || ~ | || | | |+--->(97) ...to here |...... | 1819 | if (yyn == 0) | | ~ | | | | | (98) following 'false' branch (when 'yyn_250 != 0')... ->-+ | | | | | | | |+---------------------------------------------------------------+ | 1820 || goto yyerrlab; | 1821 || goto yyreduce; | || ~ | || | | |+->(99) ...to here |...... | 1843 | switch (yyn) | | ~ | | | | | (100) following 'case 94:' branch... ->-+ | | | |...... | | | | |+------------------------------------------+ | 2467 || case 94: /* o_colon_minutes: ':' tUNUMBER */ | || ~ | || | | |+->(101) ...to here | 'yyparse': event 102 | |gl/parse-datetime.y:1027:47: | 1027 | { $$ = $2.value; } | | ^ | | | | | (102) use of uninitialized value 'yyvsp_221->textintval.value' here | gl/parse-datetime.c:2601:12: warning: use of uninitialized value 'yylval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 2601 | *++yyvsp = yylval; | ^ 'yyparse': events 1-4 | | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (1) entry to 'yyparse' |...... | 1601 | YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); | | ~ | | | | | (2) region created on stack here | | (3) capacity: 56 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | | 'yyparse': events 5-12 | | | | | |+----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(5) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (6) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(7) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (8) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (10) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(9) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(11) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (12) calling 'yylex' from 'yyparse' | +--> 'yylex': events 13-14 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (13) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (14) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 15-16 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (15) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(16) ...to here | <-------------+ | 'yyparse': events 17-20 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (17) returning to 'yyparse' from 'yylex' |...... | 1819 | if (yyn == 0) | | ~ | | | | | (18) following 'true' branch (when 'yyn_250 == 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1820 || goto yyerrlab; | || ~ | || | | |+--->(19) ...to here |...... | 2518 | if (!yyerrstatus) | | ~ | | | | | (20) following 'true' branch (when 'yyerrstatus_214 == 0')... ->-+ | | | | 'yyparse': events 21-28 | | | | | |+----------------------------------------------------------------------+ | 2518 || if (!yyerrstatus) | || ^ | || | | |+---->(21) ...to here |...... | 2577 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (22) following 'true' branch (when 'yyn_397 != -93')... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 2578 || { | 2579 || yyn += YYSYMBOL_YYerror; | || ~ | || | | |+--------->(23) ...to here | 2580 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (24) following 'true' branch... ->-+ | | | | | | | |+------------------------------------------------+ | 2581 || { | 2582 || yyn = yytable[yyn]; | || ~ | || | | |+------------->(25) ...to here | 2583 | if (0 < yyn) | | ~ | | | | | (26) following 'true' branch (when 'yyn_399 > 0')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 2601 || *++yyvsp = yylval; | || ~ ~ | || | | | || | (28) use of uninitialized value 'yylval' here | |+->(27) ...to here | gl/parse-datetime.c:2601:12: warning: use of uninitialized value 'yylval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 2601 | *++yyvsp = yylval; | ^ 'parse_datetime_body': events 1-6 | |gl/parse-datetime.y:1767:1: | 1767 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1849 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1855 || if (*p == '\0') | || ~ | || | | |+->(3) ...to here |...... | 1863 | if (ckd_add (&pc.year.value, tmp.tm_year, TM_YEAR_BASE)) | | ~ | | | | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 1869 || pc.year.digits = 0; | || ~ | || | | |+->(5) ...to here |...... | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ~ | | | | | (6) calling 'populate_local_time_zone_table' from 'parse_datetime_body' | +--> 'populate_local_time_zone_table': events 7-8 | | 1621 | populate_local_time_zone_table (parser_control *pc, struct tm const *tm) | | ^ | | | | | (7) entry to 'populate_local_time_zone_table' |...... | 1634 | if (tm->tm_zone[0]) | | ~ | | | | | (8) following 'false' branch... ->-+ | | | | 'populate_local_time_zone_table': event 9 | | | | | |+----------------------------------------+ | 1634 || if (tm->tm_zone[0]) | || ^ | || | | |+---->(9) ...to here | <------+ | 'parse_datetime_body': events 10-13 | | 1899 | populate_local_time_zone_table (&pc, &tmp); | | ^ | | | | | (10) returning to 'parse_datetime_body' from 'populate_local_time_zone_table' |...... | 1903 | for (int quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (11) following 'true' branch (when 'quarter_177 != 4')... ->-+ | | | | | | | |+---------------------------------------------------------------------------------------------+ | 1904 || { | 1905 || time_t probe; | || ~ | || | | |+----->(12) ...to here |...... | 1931 | if (yyparse (&pc) != 0) | | ~ | | | | | (13) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 14-17 | |gl/parse-datetime.c:1591:1: | 1591 | yyparse (parser_control *pc) | | ^ | | | | | (14) entry to 'yyparse' |...... | 1601 | YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); | | ~ | | | | | (15) region created on stack here | | (16) capacity: 56 bytes |...... | 1670 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (17) following 'false' branch... ->-+ | | | | 'yyparse': events 18-25 | | | | | |+-----------------------------------------+ | 1670 || if (yyss + yystacksize - 1 <= yyssp) | || ^ | || | | |+---->(18) ...to here |...... | 1734 | if (yystate == YYFINAL) | | ~ | | | | | (19) following 'false' branch (when 'yystate_210 != 12')... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------+ | 1737 || goto yybackup; | || ~ | || | | |+->(20) ...to here |...... | 1749 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (21) following 'false' branch (when 'yyn_240 != -93')... ->-+ | | | |...... | | | | |+-----------------------------------------------------------------+ | 1755 || if (yychar == YYEMPTY) | || ~ ~ | || | | | || | (23) following 'true' branch (when 'yychar_197 == -2')... ->-+ | |+->(22) ...to here | | | | | | | | |+------------------------------------------------------------------+ | 1756 || { | 1757 || YYDPRINTF ((stderr, "Reading a token\n")); | || ~ | || | | |+----->(24) ...to here | 1758 | yychar = yylex (&yylval, pc); | | ~ | | | | | (25) calling 'yylex' from 'yyparse' | +--> 'yylex': events 26-27 | |gl/parse-datetime.y:1440:1: | 1440 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (26) entry to 'yylex' |...... | 1547 | if (c_isalpha (c)) | | ~ | | | | | (27) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 28-29 | |gl/./c-ctype.h:185:3: | 185 | switch (c) | | ^ | | | | | (28) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 191 || return false; | || ~ | || | | |+----->(29) ...to here | <-------------+ | 'yyparse': events 30-33 | |gl/parse-datetime.c:1758:16: | 1758 | yychar = yylex (&yylval, pc); | | ^ | | | | | (30) returning to 'yyparse' from 'yylex' |...... | 1819 | if (yyn == 0) | | ~ | | | | | (31) following 'true' branch (when 'yyn_250 == 0')... ->-+ | | | | | | | |+--------------------------------------------------------------+ | 1820 || goto yyerrlab; | || ~ | || | | |+--->(32) ...to here |...... | 2518 | if (!yyerrstatus) | | ~ | | | | | (33) following 'true' branch (when 'yyerrstatus_214 == 0')... ->-+ | | | | 'yyparse': events 34-41 | | | | | |+----------------------------------------------------------------------+ | 2518 || if (!yyerrstatus) | || ^ | || | | |+---->(34) ...to here |...... | 2577 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (35) following 'true' branch (when 'yyn_397 != -93')... ->-+ | | | | | | | |+--------------------------------------------------------------------+ | 2578 || { | 2579 || yyn += YYSYMBOL_YYerror; | || ~ | || | | |+--------->(36) ...to here | 2580 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (37) following 'true' branch... ->-+ | | | | | | | |+------------------------------------------------+ | 2581 || { | 2582 || yyn = yytable[yyn]; | || ~ | || | | |+------------->(38) ...to here | 2583 | if (0 < yyn) | | ~ | | | | | (39) following 'true' branch (when 'yyn_399 > 0')... ->-+ | | | |...... | | | | |+-------------------------------------------------------------------------+ | 2601 || *++yyvsp = yylval; | || ~ ~ | || | | | || | (41) use of uninitialized value 'yylval' here | |+->(40) ...to here | make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/src' make[2]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/src' Making all in tests make[2]: Entering directory '/build/gnutls/src/gnutls-3.8.13/tests' Making all in . make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.13/tests' CC utils.lo CC seccomp.lo CC utils-adv.lo CC pkcs11/pkcs11-mock.lo CC pkcs11/pkcs11-mock2.lo CC pkcs11/pkcs11-mock3.lo CC pkcs11/pkcs11-mock4.lo CC pkcs11/pkcs11-mock5.lo utils.c: In function '_fail': utils.c:96:9: warning: ignoring return value of 'vasprintf' declared with attribute 'warn_unused_result' [-Wunused-result] 96 | vasprintf(&str, format, arg_ptr); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ CCLD libpkcs11mock2.la CCLD libpkcs11mock4.la CCLD libpkcs11mock3.la CCLD libpkcs11mock5.la CCLD libutils.la CCLD libpkcs11mock1.la make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/tests' Making all in cert-tests make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.13/tests/cert-tests' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/tests/cert-tests' Making all in slow make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.13/tests/slow' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/tests/slow' make[2]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/tests' Making all in fuzz make[2]: Entering directory '/build/gnutls/src/gnutls-3.8.13/fuzz' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/fuzz' Making all in doc/manpages make[2]: Entering directory '/build/gnutls/src/gnutls-3.8.13/doc/manpages' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/doc/manpages' Making all in doc make[2]: Entering directory '/build/gnutls/src/gnutls-3.8.13/doc' Making all in examples make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.13/doc/examples' CC ex-client-resume.o CC ex-alert.lo CC ex-pkcs12.lo CC ex-session-info.lo CC ex-x509-info.lo CC ex-verify.lo CC ex-client-x509-3.1.lo CC tcp.lo CC udp.lo CC ex-pkcs11-list.lo CC verify.lo CC ex-verify-ssh.lo CC ex-client-dtls.o CC ex-cert-select.o CC ex-serv-dtls.o CC ex-client-x509.o CC print-ciphersuites.o CC ex-serv-x509.o CXX ex_cxx-ex-cxx.o CC ex-client-anon.o CC ex-serv-anon.o CC ex-cert-select-pkcs11.o CC ex-client-psk.o CC ex-serv-psk.o CC ex-ocsp-client.o CC tlsproxy/buffer.o CC tlsproxy/crypto-gnutls.o CC tlsproxy/tlsproxy.o CCLD libexamples.la CCLD ex-client-resume CCLD ex-client-dtls CCLD ex-cert-select CCLD ex-client-x509 CCLD ex-serv-dtls CCLD print-ciphersuites CCLD ex-serv-x509 CCLD ex-client-anon CCLD ex-serv-anon CCLD ex-cert-select-pkcs11 CCLD ex-client-psk CCLD ex-serv-psk CCLD tlsproxy/tlsproxy CCLD ex-ocsp-client CXXLD ex-cxx ex-serv-anon.c: In function 'main': ex-serv-anon.c:72:9: warning: leak of file descriptor 'listen_sd_31' [CWE-775] [-Wanalyzer-fd-leak] 72 | SOCKET_ERR(err, "listen"); | ^ 'main': events 1-5 42 | if (gnutls_check_version("3.1.4") == NULL) { | ^ | | | (1) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 49 || gnutls_global_init(); || ~ || | |+------->(2) ...to here ...... 58 | listen_sd = socket(AF_INET, SOCK_STREAM, 0); | ~ | | | (3) socket created here | (4) when 'socket' succeeds 59 | SOCKET_ERR(listen_sd, "socket"); | ~ | | | (5) following 'false' branch (when 'listen_sd_31 != -1')... ->-+ | | 'main': events 6-7 | | |+-----------------------------------------------------------------------+ 59 || SOCKET_ERR(listen_sd, "socket"); || ^ || | |+-------------------------------------->(6) ...to here ...... 70 | SOCKET_ERR(err, "bind"); | ~ | | | (7) following 'false' branch (when 'err_38 != -1')... ->-+ | | 'main': events 8-11 | | |+-----------------------------------------------------------------+ 70 || SOCKET_ERR(err, "bind"); || ^ || | |+------------------------------>(8) ...to here 71 | err = listen(listen_sd, 1024); | ~ | | | (9) stream socket bound here | (10) when 'listen' fails 72 | SOCKET_ERR(err, "listen"); | ~ | | | (11) following 'true' branch (when 'err_40 == -1')... ->-+ | | 'main': events 12-14 | | |+-----------------------------------------------------------------+ 72 || SOCKET_ERR(err, "listen"); || ^ || | |+------->(12) ...to here | (13) if 'perror' throws an exception... | (14) 'listen_sd_31' leaks here ex-serv-anon.c:78:17: warning: leak of file descriptor 'listen_sd_31' [CWE-775] [-Wanalyzer-fd-leak] 78 | gnutls_init(&session, GNUTLS_SERVER); | ^ 'main': events 1-5 42 | if (gnutls_check_version("3.1.4") == NULL) { | ^ | | | (1) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 49 || gnutls_global_init(); || ~ || | |+------->(2) ...to here ...... 58 | listen_sd = socket(AF_INET, SOCK_STREAM, 0); | ~ | | | (3) socket created here | (4) when 'socket' succeeds 59 | SOCKET_ERR(listen_sd, "socket"); | ~ | | | (5) following 'false' branch (when 'listen_sd_31 != -1')... ->-+ | | 'main': events 6-7 | | |+-----------------------------------------------------------------------+ 59 || SOCKET_ERR(listen_sd, "socket"); || ^ || | |+-------------------------------------->(6) ...to here ...... 70 | SOCKET_ERR(err, "bind"); | ~ | | | (7) following 'false' branch (when 'err_38 != -1')... ->-+ | | 'main': events 8-11 | | |+-----------------------------------------------------------------+ 70 || SOCKET_ERR(err, "bind"); || ^ || | |+------------------------------>(8) ...to here 71 | err = listen(listen_sd, 1024); | ~ | | | (9) stream socket marked as passive here via 'listen' | (10) when 'listen' succeeds 72 | SOCKET_ERR(err, "listen"); | ~ | | | (11) following 'false' branch (when 'err_40 != -1')... ->-+ | | 'main': events 12-14 | | |+------------------------------------------------------------------+ 72 || SOCKET_ERR(err, "listen"); || ^ || | |+-------------------------------->(12) ...to here ...... 78 | gnutls_init(&session, GNUTLS_SERVER); | ~ | | | (13) if 'gnutls_init' throws an exception... | (14) 'listen_sd_31' leaks here ex-serv-anon.c:79:17: warning: leak of file descriptor 'listen_sd_31' [CWE-775] [-Wanalyzer-fd-leak] 79 | gnutls_priority_set_direct(session, | ^ 'main': events 1-5 42 | if (gnutls_check_version("3.1.4") == NULL) { | ^ | | | (1) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 49 || gnutls_global_init(); || ~ || | |+------->(2) ...to here ...... 58 | listen_sd = socket(AF_INET, SOCK_STREAM, 0); | ~ | | | (3) socket created here | (4) when 'socket' succeeds 59 | SOCKET_ERR(listen_sd, "socket"); | ~ | | | (5) following 'false' branch (when 'listen_sd_31 != -1')... ->-+ | | 'main': events 6-7 | | |+-----------------------------------------------------------------------+ 59 || SOCKET_ERR(listen_sd, "socket"); || ^ || | |+-------------------------------------->(6) ...to here ...... 70 | SOCKET_ERR(err, "bind"); | ~ | | | (7) following 'false' branch (when 'err_38 != -1')... ->-+ | | 'main': events 8-11 | | |+-----------------------------------------------------------------+ 70 || SOCKET_ERR(err, "bind"); || ^ || | |+------------------------------>(8) ...to here 71 | err = listen(listen_sd, 1024); | ~ | | | (9) stream socket marked as passive here via 'listen' | (10) when 'listen' succeeds 72 | SOCKET_ERR(err, "listen"); | ~ | | | (11) following 'false' branch (when 'err_40 != -1')... ->-+ | | 'main': events 12-14 | | |+------------------------------------------------------------------+ 72 || SOCKET_ERR(err, "listen"); || ^ || | |+-------------------------------->(12) ...to here ...... 79 | gnutls_priority_set_direct(session, | ~ | | | (13) if 'gnutls_priority_set_direct' throws an exception... | (14) 'listen_sd_31' leaks here ex-serv-anon.c:81:17: warning: leak of file descriptor 'listen_sd_31' [CWE-775] [-Wanalyzer-fd-leak] 81 | gnutls_credentials_set(session, GNUTLS_CRD_ANON, anoncred); | ^ 'main': events 1-5 42 | if (gnutls_check_version("3.1.4") == NULL) { | ^ | | | (1) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 49 || gnutls_global_init(); || ~ || | |+------->(2) ...to here ...... 58 | listen_sd = socket(AF_INET, SOCK_STREAM, 0); | ~ | | | (3) socket created here | (4) when 'socket' succeeds 59 | SOCKET_ERR(listen_sd, "socket"); | ~ | | | (5) following 'false' branch (when 'listen_sd_31 != -1')... ->-+ | | 'main': events 6-7 | | |+-----------------------------------------------------------------------+ 59 || SOCKET_ERR(listen_sd, "socket"); || ^ || | |+-------------------------------------->(6) ...to here ...... 70 | SOCKET_ERR(err, "bind"); | ~ | | | (7) following 'false' branch (when 'err_38 != -1')... ->-+ | | 'main': events 8-11 | | |+-----------------------------------------------------------------+ 70 || SOCKET_ERR(err, "bind"); || ^ || | |+------------------------------>(8) ...to here 71 | err = listen(listen_sd, 1024); | ~ | | | (9) stream socket marked as passive here via 'listen' | (10) when 'listen' succeeds 72 | SOCKET_ERR(err, "listen"); | ~ | | | (11) following 'false' branch (when 'err_40 != -1')... ->-+ | | 'main': events 12-14 | | |+------------------------------------------------------------------+ 72 || SOCKET_ERR(err, "listen"); || ^ || | |+-------------------------------->(12) ...to here ...... 81 | gnutls_credentials_set(session, GNUTLS_CRD_ANON, anoncred); | ~ | | | (13) if 'gnutls_credentials_set' throws an exception... | (14) 'listen_sd_31' leaks here ex-serv-anon.c:83:22: warning: leak of file descriptor 'listen_sd_31' [CWE-775] [-Wanalyzer-fd-leak] 83 | sd = accept(listen_sd, (struct sockaddr *)&sa_cli, &client_len); | ^ 'main': events 1-5 42 | if (gnutls_check_version("3.1.4") == NULL) { | ^ | | | (1) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 49 || gnutls_global_init(); || ~ || | |+------->(2) ...to here ...... 58 | listen_sd = socket(AF_INET, SOCK_STREAM, 0); | ~ | | | (3) socket created here | (4) when 'socket' succeeds 59 | SOCKET_ERR(listen_sd, "socket"); | ~ | | | (5) following 'false' branch (when 'listen_sd_31 != -1')... ->-+ | | 'main': events 6-7 | | |+-----------------------------------------------------------------------+ 59 || SOCKET_ERR(listen_sd, "socket"); || ^ || | |+-------------------------------------->(6) ...to here ...... 70 | SOCKET_ERR(err, "bind"); | ~ | | | (7) following 'false' branch (when 'err_38 != -1')... ->-+ | | 'main': events 8-11 | | |+-----------------------------------------------------------------+ 70 || SOCKET_ERR(err, "bind"); || ^ || | |+------------------------------>(8) ...to here 71 | err = listen(listen_sd, 1024); | ~ | | | (9) stream socket marked as passive here via 'listen' | (10) when 'listen' succeeds 72 | SOCKET_ERR(err, "listen"); | ~ | | | (11) following 'false' branch (when 'err_40 != -1')... ->-+ | | 'main': events 12-14 | | |+------------------------------------------------------------------+ 72 || SOCKET_ERR(err, "listen"); || ^ || | |+-------------------------------->(12) ...to here ...... 83 | sd = accept(listen_sd, (struct sockaddr *)&sa_cli, &client_len); | ~ | | | (13) if 'accept' throws an exception... | (14) 'listen_sd_31' leaks here tcp.c: In function 'tcp_connect': tcp.c:39:15: warning: leak of file descriptor 'sd_5' [CWE-775] [-Wanalyzer-fd-leak] 39 | err = connect(sd, (struct sockaddr *)&sa, sizeof(sa)); | ^ 'tcp_connect': events 1-4 32 | sd = socket(AF_INET, SOCK_STREAM, 0); | ^ | | | (1) socket created here | (2) when 'socket' succeeds ...... 39 | err = connect(sd, (struct sockaddr *)&sa, sizeof(sa)); | ~ | | | (3) if 'connect' throws an exception... | (4) 'sd_5' leaks here tcp.c: In function 'tcp_connect': tcp.c:39:15: warning: leak of file descriptor 'sd_5' [CWE-775] [-Wanalyzer-fd-leak] 39 | err = connect(sd, (struct sockaddr *)&sa, sizeof(sa)); | ^ tcp.c: In function 'tcp_connect': 'tcp_connect': events 1-4 32 | sd = socket(AF_INET, SOCK_STREAM, 0); | ^ | | | (1) socket created here | (2) when 'socket' succeeds ...... 39 | err = connect(sd, (struct sockaddr *)&sa, sizeof(sa)); | ~ | | | (3) if 'connect' throws an exception... | (4) 'sd_5' leaks here tcp.c:39:15: warning: leak of file descriptor 'sd_5' [CWE-775] [-Wanalyzer-fd-leak] 39 | err = connect(sd, (struct sockaddr *)&sa, sizeof(sa)); | ^ ex-serv-x509.c: In function 'main': 'tcp_connect': events 1-4 32 | sd = socket(AF_INET, SOCK_STREAM, 0); | ^ | | | (1) socket created here | (2) when 'socket' succeeds ...... 39 | err = connect(sd, (struct sockaddr *)&sa, sizeof(sa)); | ~ | | | (3) if 'connect' throws an exception... | (4) 'sd_5' leaks here ex-serv-x509.c:122:17: warning: leak of file descriptor 'listen_sd_64' [CWE-775] [-Wanalyzer-fd-leak] 122 | CHECK(gnutls_init(&session, GNUTLS_SERVER)); | ^ tcp.c: In function 'tcp_connect': 'main': events 1-26 60 | CHECK(gnutls_global_init()); | ^ | | | (1) following 'true' branch... ->-+ | | | | |+------------------------------------------+ 61 || 62 || CHECK(gnutls_certificate_allocate_credentials(&x509_cred)); || ~ || | |+------->(2) ...to here | (3) following 'true' branch... ->-+ | | | | |+------------------------------------------+ 63 || 64 || CHECK(gnutls_certificate_set_x509_trust_file(x509_cred, CAFILE, || ~ || | |+------->(4) ...to here | (5) following 'true' branch... ->-+ | | ...... | | |+------------------------------------------+ 67 || CHECK(gnutls_certificate_set_x509_crl_file(x509_cred, CRLFILE, || ~ || | |+------->(6) ...to here | (7) following 'true' branch... ->-+ | | ...... | | |+------------------------------------------+ 76 || CHECK(gnutls_certificate_set_x509_key_file(x509_cred, CERTFILE, KEYFILE, || ~ || | |+------->(8) ...to here | (9) following 'true' branch... ->-+ | | ...... | | |+------------------------------------------+ 79 || CHECK(gnutls_certificate_set_ocsp_status_request_file( || ~ || | |+------->(10) ...to here | (11) following 'true' branch... ->-+ | | ...... | | |+-------------------------------------------+ 82 || CHECK(gnutls_priority_init(&priority_cache, NULL, NULL)); || ~ || | |+------->(12) ...to here | (13) following 'true' branch... ->-+ | | ...... | | |+-------------------------------------------+ 95 || gnutls_certificate_set_known_dh_params(x509_cred, || ~ || | |+------->(14) ...to here ...... 101 | listen_sd = socket(AF_INET, SOCK_STREAM, 0); | ~ | | | (15) socket created here | (16) when 'socket' succeeds 102 | CHECK(listen_sd); | ~ | | | (17) following 'true' branch (when 'listen_sd_64 >= 0')... ->-+ | | | | |+----------------------------------------------------------------------+ 103 || 104 || memset(&sa_serv, '\0', sizeof(sa_serv)); || ~ || | |+------->(18) ...to here ...... 113 | CHECK(ret); | ~ | | | (19) following 'true' branch (when 'ret_72 >= 0')... ->-+ | | | | |+----------------------------------------------------------------+ 114 || 115 || ret = listen(listen_sd, 1024); || ~ ~ || | | || | (21) stream socket marked as passive here via 'listen' || | (22) when 'listen' succeeds |+------->(20) ...to here 116 | CHECK(ret); | ~ | | | (23) following 'true' branch (when 'ret_75 >= 0')... ->-+ | | | | |+----------------------------------------------------------------+ 117 || 118 || printf("Server ready. Listening to port '%d'.\n\n", PORT); || ~ || | |+------->(24) ...to here ...... 122 | CHECK(gnutls_init(&session, GNUTLS_SERVER)); | ~ | | | (25) if 'gnutls_init' throws an exception... | (26) 'listen_sd_64' leaks here ex-serv-x509.c:123:17: warning: leak of file descriptor 'listen_sd_64' [CWE-775] [-Wanalyzer-fd-leak] 123 | CHECK(gnutls_priority_set(session, priority_cache)); | ^ tcp.c:39:15: warning: leak of file descriptor 'sd_5' [CWE-775] [-Wanalyzer-fd-leak] 39 | err = connect(sd, (struct sockaddr *)&sa, sizeof(sa)); | ^ 'main': events 1-28 60 | CHECK(gnutls_global_init()); | ^ | | | (1) following 'true' branch... ->-+ | | | | |+------------------------------------------+ 61 || 62 || CHECK(gnutls_certificate_allocate_credentials(&x509_cred)); || ~ || | |+------->(2) ...to here | (3) following 'true' branch... ->-+ | | | | |+------------------------------------------+ 63 || 64 || CHECK(gnutls_certificate_set_x509_trust_file(x509_cred, CAFILE, || ~ || | |+------->(4) ...to here | (5) following 'true' branch... ->-+ | | ...... | | |+------------------------------------------+ 67 || CHECK(gnutls_certificate_set_x509_crl_file(x509_cred, CRLFILE, || ~ || | |+------->(6) ...to here | (7) following 'true' branch... ->-+ | | ...... | | |+------------------------------------------+ 76 || CHECK(gnutls_certificate_set_x509_key_file(x509_cred, CERTFILE, KEYFILE, || ~ || | |+------->(8) ...to here | (9) following 'true' branch... ->-+ | | ...... | | |+------------------------------------------+ 79 || CHECK(gnutls_certificate_set_ocsp_status_request_file( || ~ || | |+------->(10) ...to here | (11) following 'true' branch... ->-+ | | ...... | | |+-------------------------------------------+ 82 || CHECK(gnutls_priority_init(&priority_cache, NULL, NULL)); || ~ || | |+------->(12) ...to here | (13) following 'true' branch... ->-+ | | ...... | | |+-------------------------------------------+ 95 || gnutls_certificate_set_known_dh_params(x509_cred, || ~ || | |+------->(14) ...to here ...... 101 | listen_sd = socket(AF_INET, SOCK_STREAM, 0); | ~ | | | (15) socket created here | (16) when 'socket' succeeds 102 | CHECK(listen_sd); | ~ | | | (17) following 'true' branch (when 'listen_sd_64 >= 0')... ->-+ | | | | |+----------------------------------------------------------------------+ 103 || 104 || memset(&sa_serv, '\0', sizeof(sa_serv)); || ~ || | |+------->(18) ...to here ...... 113 | CHECK(ret); | ~ | | | (19) following 'true' branch (when 'ret_72 >= 0')... ->-+ | | | | |+----------------------------------------------------------------+ 114 || 115 || ret = listen(listen_sd, 1024); || ~ ~ || | | || | (21) stream socket marked as passive here via 'listen' || | (22) when 'listen' succeeds |+------->(20) ...to here 116 | CHECK(ret); | ~ | | | (23) following 'true' branch (when 'ret_75 >= 0')... ->-+ | | | | |+----------------------------------------------------------------+ 117 || 118 || printf("Server ready. Listening to port '%d'.\n\n", PORT); || ~ || | |+------->(24) ...to here ...... 122 | CHECK(gnutls_init(&session, GNUTLS_SERVER)); | ~ | | | (25) following 'true' branch... ->-+ | | | | |+---------------------------------------------------+ 123 || CHECK(gnutls_priority_set(session, priority_cache)); || ~ || | |+--------------->(26) ...to here | (27) if 'gnutls_priority_set' throws an exception... | (28) 'listen_sd_64' leaks here ex-serv-psk.c: In function 'main': ex-serv-x509.c:124:17: warning: leak of file descriptor 'listen_sd_64' [CWE-775] [-Wanalyzer-fd-leak] 124 | CHECK(gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, | ^ 'tcp_connect': events 1-4 32 | sd = socket(AF_INET, SOCK_STREAM, 0); | ^ | | | (1) socket created here | (2) when 'socket' succeeds ...... 39 | err = connect(sd, (struct sockaddr *)&sa, sizeof(sa)); | ~ | | | (3) if 'connect' throws an exception... | (4) 'sd_5' leaks here 'main': events 1-30 60 | CHECK(gnutls_global_init()); | ^ | | | (1) following 'true' branch... ->-+ | | | | |+------------------------------------------+ 61 || 62 || CHECK(gnutls_certificate_allocate_credentials(&x509_cred)); || ~ || | |+------->(2) ...to here | (3) following 'true' branch... ->-+ | | | | |+------------------------------------------+ 63 || 64 || CHECK(gnutls_certificate_set_x509_trust_file(x509_cred, CAFILE, || ~ || | |+------->(4) ...to here | (5) following 'true' branch... ->-+ | | ...... | | |+------------------------------------------+ 67 || CHECK(gnutls_certificate_set_x509_crl_file(x509_cred, CRLFILE, || ~ || | |+------->(6) ...to here | (7) following 'true' branch... ->-+ | | ...... | | |+------------------------------------------+ 76 || CHECK(gnutls_certificate_set_x509_key_file(x509_cred, CERTFILE, KEYFILE, || ~ || | |+------->(8) ...to here | (9) following 'true' branch... ->-+ | | ...... | | |+------------------------------------------+ 79 || CHECK(gnutls_certificate_set_ocsp_status_request_file( || ~ || | |+------->(10) ...to here | (11) following 'true' branch... ->-+ | | ...... | | |+-------------------------------------------+ 82 || CHECK(gnutls_priority_init(&priority_cache, NULL, NULL)); || ~ || | |+------->(12) ...to here | (13) following 'true' branch... ->-+ | | ...... | | |+-------------------------------------------+ 95 || gnutls_certificate_set_known_dh_params(x509_cred, || ~ || | |+------->(14) ...to here ...... 101 | listen_sd = socket(AF_INET, SOCK_STREAM, 0); | ~ | | | (15) socket created here | (16) when 'socket' succeeds 102 | CHECK(listen_sd); | ~ | | | (17) following 'true' branch (when 'listen_sd_64 >= 0')... ->-+ | | | | |+----------------------------------------------------------------------+ 103 || 104 || memset(&sa_serv, '\0', sizeof(sa_serv)); || ~ || | |+------->(18) ...to here ...... 113 | CHECK(ret); | ~ | | | (19) following 'true' branch (when 'ret_72 >= 0')... ->-+ | | | | |+----------------------------------------------------------------+ 114 || 115 || ret = listen(listen_sd, 1024); || ~ ~ || | | || | (21) stream socket marked as passive here via 'listen' || | (22) when 'listen' succeeds |+------->(20) ...to here 116 | CHECK(ret); | ~ | | | (23) following 'true' branch (when 'ret_75 >= 0')... ->-+ | | | | |+----------------------------------------------------------------+ 117 || 118 || printf("Server ready. Listening to port '%d'.\n\n", PORT); || ~ || | |+------->(24) ...to here ...... 122 | CHECK(gnutls_init(&session, GNUTLS_SERVER)); | ~ | | | (25) following 'true' branch... ->-+ | | | | |+---------------------------------------------------+ 123 || CHECK(gnutls_priority_set(session, priority_cache)); || ~ || | |+--------------->(26) ...to here | (27) following 'true' branch... ->-+ | | | | |+---------------------------------------------------+ 124 || CHECK(gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, || ~ || | |+--------------->(28) ...to here | (29) if 'gnutls_credentials_set' throws an exception... | (30) 'listen_sd_64' leaks here ex-serv-x509.c:132:17: warning: leak of file descriptor 'listen_sd_64' [CWE-775] [-Wanalyzer-fd-leak] 132 | gnutls_certificate_server_set_request(session, | ^ ex-serv-psk.c:118:9: warning: leak of file descriptor 'listen_sd_62' [CWE-775] [-Wanalyzer-fd-leak] 118 | SOCKET_ERR(err, "listen"); | ^ 'main': events 1-32 60 | CHECK(gnutls_global_init()); | ^ | | | (1) following 'true' branch... ->-+ | | | | |+------------------------------------------+ 61 || 62 || CHECK(gnutls_certificate_allocate_credentials(&x509_cred)); || ~ || | |+------->(2) ...to here | (3) following 'true' branch... ->-+ | | | | |+------------------------------------------+ 63 || 64 || CHECK(gnutls_certificate_set_x509_trust_file(x509_cred, CAFILE, || ~ || | |+------->(4) ...to here | (5) following 'true' branch... ->-+ | | ...... | | |+------------------------------------------+ 67 || CHECK(gnutls_certificate_set_x509_crl_file(x509_cred, CRLFILE, || ~ || | |+------->(6) ...to here | (7) following 'true' branch... ->-+ | | ...... | | |+------------------------------------------+ 76 || CHECK(gnutls_certificate_set_x509_key_file(x509_cred, CERTFILE, KEYFILE, || ~ || | |+------->(8) ...to here | (9) following 'true' branch... ->-+ | | ...... | | |+------------------------------------------+ 79 || CHECK(gnutls_certificate_set_ocsp_status_request_file( || ~ || | |+------->(10) ...to here | (11) following 'true' branch... ->-+ | | ...... | | |+-------------------------------------------+ 82 || CHECK(gnutls_priority_init(&priority_cache, NULL, NULL)); || ~ || | |+------->(12) ...to here | (13) following 'true' branch... ->-+ | | ...... | | |+-------------------------------------------+ 95 || gnutls_certificate_set_known_dh_params(x509_cred, || ~ || | |+------->(14) ...to here ...... 101 | listen_sd = socket(AF_INET, SOCK_STREAM, 0); | ~ | | | (15) socket created here | (16) when 'socket' succeeds 102 | CHECK(listen_sd); | ~ | | | (17) following 'true' branch (when 'listen_sd_64 >= 0')... ->-+ | | | | |+----------------------------------------------------------------------+ 103 || 104 || memset(&sa_serv, '\0', sizeof(sa_serv)); || ~ || | |+------->(18) ...to here ...... 113 | CHECK(ret); | ~ | | | (19) following 'true' branch (when 'ret_72 >= 0')... ->-+ | | | | |+----------------------------------------------------------------+ 114 || 115 || ret = listen(listen_sd, 1024); || ~ ~ || | | || | (21) stream socket marked as passive here via 'listen' || | (22) when 'listen' succeeds |+------->(20) ...to here 116 | CHECK(ret); | ~ | | | (23) following 'true' branch (when 'ret_75 >= 0')... ->-+ | | | | |+----------------------------------------------------------------+ 117 || 118 || printf("Server ready. Listening to port '%d'.\n\n", PORT); || ~ || | |+------->(24) ...to here ...... 122 | CHECK(gnutls_init(&session, GNUTLS_SERVER)); | ~ | | | (25) following 'true' branch... ->-+ | | | | |+---------------------------------------------------+ 123 || CHECK(gnutls_priority_set(session, priority_cache)); || ~ || | |+--------------->(26) ...to here | (27) following 'true' branch... ->-+ | | | | |+---------------------------------------------------+ 124 || CHECK(gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, || ~ || | |+--------------->(28) ...to here | (29) following 'true' branch... ->-+ | | ...... | | |+---------------------------------------------------+ 132 || gnutls_certificate_server_set_request(session, || ~ || | |+--------------->(30) ...to here | (31) if 'gnutls_certificate_server_set_request' throws an exception... | (32) 'listen_sd_64' leaks here ex-serv-x509.c:134:17: warning: leak of file descriptor 'listen_sd_64' [CWE-775] [-Wanalyzer-fd-leak] 134 | gnutls_handshake_set_timeout(session, | ^ tcp.c: In function 'tcp_connect': 'main': events 1-5 69 | if (gnutls_check_version("3.1.4") == NULL) { | ^ | | | (1) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 76 || gnutls_global_init(); || ~ || | |+------->(2) ...to here ...... 104 | listen_sd = socket(AF_INET, SOCK_STREAM, 0); | ~ | | | (3) socket created here | (4) when 'socket' succeeds 105 | SOCKET_ERR(listen_sd, "socket"); | ~ | | | (5) following 'false' branch (when 'listen_sd_62 != -1')... ->-+ | | 'main': events 6-7 | | |+-----------------------------------------------------------------------+ 105 || SOCKET_ERR(listen_sd, "socket"); || ^ || | |+-------------------------------------->(6) ...to here ...... 116 | SOCKET_ERR(err, "bind"); | ~ | | | (7) following 'false' branch (when 'err_69 != -1')... ->-+ | | 'main': events 8-11 | | |+-----------------------------------------------------------------+ 116 || SOCKET_ERR(err, "bind"); || ^ || | |+------------------------------>(8) ...to here 117 | err = listen(listen_sd, 1024); | ~ | | | (9) stream socket bound here | (10) when 'listen' fails 118 | SOCKET_ERR(err, "listen"); | ~ | | | (11) following 'true' branch (when 'err_71 == -1')... ->-+ | | 'main': events 12-14 | | |+-----------------------------------------------------------------+ 118 || SOCKET_ERR(err, "listen"); || ^ || | |+------->(12) ...to here | (13) if 'perror' throws an exception... | (14) 'listen_sd_62' leaks here ex-serv-psk.c:124:17: warning: leak of file descriptor 'listen_sd_62' [CWE-775] [-Wanalyzer-fd-leak] 124 | gnutls_init(&session, GNUTLS_SERVER); | ^ 'main': events 1-32 60 | CHECK(gnutls_global_init()); | ^ | | | (1) following 'true' branch... ->-+ | | | | |+------------------------------------------+ 61 || 62 || CHECK(gnutls_certificate_allocate_credentials(&x509_cred)); || ~ || | |+------->(2) ...to here | (3) following 'true' branch... ->-+ | | | | |+------------------------------------------+ 63 || 64 || CHECK(gnutls_certificate_set_x509_trust_file(x509_cred, CAFILE, || ~ || | |+------->(4) ...to here | (5) following 'true' branch... ->-+ | | ...... | | |+------------------------------------------+ 67 || CHECK(gnutls_certificate_set_x509_crl_file(x509_cred, CRLFILE, || ~ || | |+------->(6) ...to here | (7) following 'true' branch... ->-+ | | ...... | | |+------------------------------------------+ 76 || CHECK(gnutls_certificate_set_x509_key_file(x509_cred, CERTFILE, KEYFILE, || ~ || | |+------->(8) ...to here | (9) following 'true' branch... ->-+ | | ...... | | |+------------------------------------------+ 79 || CHECK(gnutls_certificate_set_ocsp_status_request_file( || ~ || | |+------->(10) ...to here | (11) following 'true' branch... ->-+ | | ...... | | |+-------------------------------------------+ 82 || CHECK(gnutls_priority_init(&priority_cache, NULL, NULL)); || ~ || | |+------->(12) ...to here | (13) following 'true' branch... ->-+ | | ...... | | |+-------------------------------------------+ 95 || gnutls_certificate_set_known_dh_params(x509_cred, || ~ || | |+------->(14) ...to here ...... 101 | listen_sd = socket(AF_INET, SOCK_STREAM, 0); | ~ | | | (15) socket created here | (16) when 'socket' succeeds 102 | CHECK(listen_sd); | ~ | | | (17) following 'true' branch (when 'listen_sd_64 >= 0')... ->-+ | | | | |+----------------------------------------------------------------------+ 103 || 104 || memset(&sa_serv, '\0', sizeof(sa_serv)); || ~ || | |+------->(18) ...to here ...... 113 | CHECK(ret); | ~ | | | (19) following 'true' branch (when 'ret_72 >= 0')... ->-+ | | | | |+----------------------------------------------------------------+ 114 || 115 || ret = listen(listen_sd, 1024); || ~ ~ || | | || | (21) stream socket marked as passive here via 'listen' || | (22) when 'listen' succeeds |+------->(20) ...to here 116 | CHECK(ret); | ~ | | | (23) following 'true' branch (when 'ret_75 >= 0')... ->-+ | | | | |+----------------------------------------------------------------+ 117 || 118 || printf("Server ready. Listening to port '%d'.\n\n", PORT); || ~ || | |+------->(24) ...to here ...... 122 | CHECK(gnutls_init(&session, GNUTLS_SERVER)); | ~ | | | (25) following 'true' branch... ->-+ | | | | |+---------------------------------------------------+ 123 || CHECK(gnutls_priority_set(session, priority_cache)); || ~ || | |+--------------->(26) ...to here | (27) following 'true' branch... ->-+ | | | | |+---------------------------------------------------+ 124 || CHECK(gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, || ~ || | |+--------------->(28) ...to here | (29) following 'true' branch... ->-+ | | ...... | | |+---------------------------------------------------+ 132 || gnutls_certificate_server_set_request(session, || ~ || | |+--------------->(30) ...to here 133 | GNUTLS_CERT_IGNORE); 134 | gnutls_handshake_set_timeout(session, | ~ | | | (31) if 'gnutls_handshake_set_timeout' throws an exception... | (32) 'listen_sd_64' leaks here 'main': events 1-5 69 | if (gnutls_check_version("3.1.4") == NULL) { | ^ | | | (1) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 76 || gnutls_global_init(); || ~ || | |+------->(2) ...to here ...... 104 | listen_sd = socket(AF_INET, SOCK_STREAM, 0); | ~ | | | (3) socket created here | (4) when 'socket' succeeds 105 | SOCKET_ERR(listen_sd, "socket"); | ~ | | | (5) following 'false' branch (when 'listen_sd_62 != -1')... ->-+ | | 'main': events 6-7 | | |+-----------------------------------------------------------------------+ 105 || SOCKET_ERR(listen_sd, "socket"); || ^ || | |+-------------------------------------->(6) ...to here ...... 116 | SOCKET_ERR(err, "bind"); | ~ | | | (7) following 'false' branch (when 'err_69 != -1')... ->-+ | | 'main': events 8-11 | | |+-----------------------------------------------------------------+ 116 || SOCKET_ERR(err, "bind"); || ^ || | |+------------------------------>(8) ...to here 117 | err = listen(listen_sd, 1024); | ~ | | | (9) stream socket marked as passive here via 'listen' | (10) when 'listen' succeeds 118 | SOCKET_ERR(err, "listen"); | ~ | | | (11) following 'false' branch (when 'err_71 != -1')... ->-+ | | 'main': events 12-14 | | |+------------------------------------------------------------------+ 118 || SOCKET_ERR(err, "listen"); || ^ || | |+-------------------------------->(12) ...to here ...... 124 | gnutls_init(&session, GNUTLS_SERVER); | ~ | | | (13) if 'gnutls_init' throws an exception... | (14) 'listen_sd_62' leaks here ex-serv-x509.c:137:22: warning: leak of file descriptor 'listen_sd_64' [CWE-775] [-Wanalyzer-fd-leak] 137 | sd = accept(listen_sd, (struct sockaddr *)&sa_cli, &client_len); | ^ ex-serv-psk.c:125:17: warning: leak of file descriptor 'listen_sd_62' [CWE-775] [-Wanalyzer-fd-leak] 125 | gnutls_priority_set(session, priority_cache); | ^ 'main': events 1-5 69 | if (gnutls_check_version("3.1.4") == NULL) { | ^ | | | (1) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 76 || gnutls_global_init(); || ~ || | |+------->(2) ...to here ...... 104 | listen_sd = socket(AF_INET, SOCK_STREAM, 0); | ~ | | | (3) socket created here | (4) when 'socket' succeeds 105 | SOCKET_ERR(listen_sd, "socket"); | ~ | | | (5) following 'false' branch (when 'listen_sd_62 != -1')... ->-+ | | 'main': events 6-7 | | |+-----------------------------------------------------------------------+ 105 || SOCKET_ERR(listen_sd, "socket"); || ^ || | |+-------------------------------------->(6) ...to here ...... 116 | SOCKET_ERR(err, "bind"); | ~ | | | (7) following 'false' branch (when 'err_69 != -1')... ->-+ | | 'main': events 8-11 | | |+-----------------------------------------------------------------+ 116 || SOCKET_ERR(err, "bind"); || ^ || | |+------------------------------>(8) ...to here 117 | err = listen(listen_sd, 1024); | ~ | | | (9) stream socket marked as passive here via 'listen' | (10) when 'listen' succeeds 118 | SOCKET_ERR(err, "listen"); | ~ | | | (11) following 'false' branch (when 'err_71 != -1')... ->-+ | | 'main': events 12-14 | | |+------------------------------------------------------------------+ 118 || SOCKET_ERR(err, "listen"); || ^ || | |+-------------------------------->(12) ...to here ...... 125 | gnutls_priority_set(session, priority_cache); | ~ | | | (13) if 'gnutls_priority_set' throws an exception... | (14) 'listen_sd_62' leaks here ex-serv-psk.c:126:17: warning: leak of file descriptor 'listen_sd_62' [CWE-775] [-Wanalyzer-fd-leak] 126 | gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, | ^ tcp.c:39:15: warning: leak of file descriptor 'sd_5' [CWE-775] [-Wanalyzer-fd-leak] 39 | err = connect(sd, (struct sockaddr *)&sa, sizeof(sa)); | ^ 'main': events 1-5 69 | if (gnutls_check_version("3.1.4") == NULL) { | ^ | | | (1) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 76 || gnutls_global_init(); || ~ || | |+------->(2) ...to here ...... 104 | listen_sd = socket(AF_INET, SOCK_STREAM, 0); | ~ | | | (3) socket created here | (4) when 'socket' succeeds 105 | SOCKET_ERR(listen_sd, "socket"); | ~ | | | (5) following 'false' branch (when 'listen_sd_62 != -1')... ->-+ | | 'main': events 6-7 | | |+-----------------------------------------------------------------------+ 105 || SOCKET_ERR(listen_sd, "socket"); || ^ || | |+-------------------------------------->(6) ...to here ...... 116 | SOCKET_ERR(err, "bind"); | ~ | | | (7) following 'false' branch (when 'err_69 != -1')... ->-+ | | 'main': events 8-11 | | |+-----------------------------------------------------------------+ 116 || SOCKET_ERR(err, "bind"); || ^ || | |+------------------------------>(8) ...to here 117 | err = listen(listen_sd, 1024); | ~ | | | (9) stream socket marked as passive here via 'listen' | (10) when 'listen' succeeds 118 | SOCKET_ERR(err, "listen"); | ~ | | | (11) following 'false' branch (when 'err_71 != -1')... ->-+ | | 'main': events 12-14 | | |+------------------------------------------------------------------+ 118 || SOCKET_ERR(err, "listen"); || ^ || | |+-------------------------------->(12) ...to here ...... 126 | gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, | ~ | | | (13) if 'gnutls_credentials_set' throws an exception... | (14) 'listen_sd_62' leaks here 'main': events 1-32 60 | CHECK(gnutls_global_init()); | ^ | | | (1) following 'true' branch... ->-+ | | | | |+------------------------------------------+ 61 || 62 || CHECK(gnutls_certificate_allocate_credentials(&x509_cred)); || ~ || | |+------->(2) ...to here | (3) following 'true' branch... ->-+ | | | | |+------------------------------------------+ 63 || 64 || CHECK(gnutls_certificate_set_x509_trust_file(x509_cred, CAFILE, || ~ || | |+------->(4) ...to here | (5) following 'true' branch... ->-+ | | ...... | | |+------------------------------------------+ 67 || CHECK(gnutls_certificate_set_x509_crl_file(x509_cred, CRLFILE, || ~ || | |+------->(6) ...to here | (7) following 'true' branch... ->-+ | | ...... | | |+------------------------------------------+ 76 || CHECK(gnutls_certificate_set_x509_key_file(x509_cred, CERTFILE, KEYFILE, || ~ || | |+------->(8) ...to here | (9) following 'true' branch... ->-+ | | ...... | | |+------------------------------------------+ 79 || CHECK(gnutls_certificate_set_ocsp_status_request_file( || ~ || | |+------->(10) ...to here | (11) following 'true' branch... ->-+ | | ...... | | |+-------------------------------------------+ 82 || CHECK(gnutls_priority_init(&priority_cache, NULL, NULL)); || ~ || | |+------->(12) ...to here | (13) following 'true' branch... ->-+ | | ...... | | |+-------------------------------------------+ 95 || gnutls_certificate_set_known_dh_params(x509_cred, || ~ || | |+------->(14) ...to here ...... 101 | listen_sd = socket(AF_INET, SOCK_STREAM, 0); | ~ | | | (15) socket created here | (16) when 'socket' succeeds 102 | CHECK(listen_sd); | ~ | | | (17) following 'true' branch (when 'listen_sd_64 >= 0')... ->-+ | | | | |+----------------------------------------------------------------------+ 103 || 104 || memset(&sa_serv, '\0', sizeof(sa_serv)); || ~ || | |+------->(18) ...to here ...... 113 | CHECK(ret); | ~ | | | (19) following 'true' branch (when 'ret_72 >= 0')... ->-+ | | | | |+----------------------------------------------------------------+ 114 || 115 || ret = listen(listen_sd, 1024); || ~ ~ || | | || | (21) stream socket marked as passive here via 'listen' || | (22) when 'listen' succeeds |+------->(20) ...to here 116 | CHECK(ret); | ~ | | | (23) following 'true' branch (when 'ret_75 >= 0')... ->-+ | | | | |+----------------------------------------------------------------+ 117 || 118 || printf("Server ready. Listening to port '%d'.\n\n", PORT); || ~ || | |+------->(24) ...to here ...... 122 | CHECK(gnutls_init(&session, GNUTLS_SERVER)); | ~ | | | (25) following 'true' branch... ->-+ | | | | |+---------------------------------------------------+ 123 || CHECK(gnutls_priority_set(session, priority_cache)); || ~ || | |+--------------->(26) ...to here | (27) following 'true' branch... ->-+ | | | | |+---------------------------------------------------+ 124 || CHECK(gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, || ~ || | |+--------------->(28) ...to here | (29) following 'true' branch... ->-+ | | ...... | | |+---------------------------------------------------+ 132 || gnutls_certificate_server_set_request(session, || ~ || | |+--------------->(30) ...to here ...... 137 | sd = accept(listen_sd, (struct sockaddr *)&sa_cli, &client_len); | ~ | | | (31) if 'accept' throws an exception... | (32) 'listen_sd_64' leaks here ex-serv-psk.c:128:17: warning: leak of file descriptor 'listen_sd_62' [CWE-775] [-Wanalyzer-fd-leak] 128 | gnutls_credentials_set(session, GNUTLS_CRD_PSK, psk_cred); | ^ 'main': events 1-5 69 | if (gnutls_check_version("3.1.4") == NULL) { | ^ | | | (1) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 76 || gnutls_global_init(); || ~ || | |+------->(2) ...to here ...... 104 | listen_sd = socket(AF_INET, SOCK_STREAM, 0); | ~ | | | (3) socket created here | (4) when 'socket' succeeds 105 | SOCKET_ERR(listen_sd, "socket"); | ~ | | | (5) following 'false' branch (when 'listen_sd_62 != -1')... ->-+ | | 'main': events 6-7 | | |+-----------------------------------------------------------------------+ 105 || SOCKET_ERR(listen_sd, "socket"); || ^ || | |+-------------------------------------->(6) ...to here ...... 116 | SOCKET_ERR(err, "bind"); | ~ | | | (7) following 'false' branch (when 'err_69 != -1')... ->-+ | | 'main': events 8-11 | | |+-----------------------------------------------------------------+ 116 || SOCKET_ERR(err, "bind"); || ^ || | |+------------------------------>(8) ...to here 117 | err = listen(listen_sd, 1024); | ~ | | | (9) stream socket marked as passive here via 'listen' | (10) when 'listen' succeeds 118 | SOCKET_ERR(err, "listen"); | ~ | | | (11) following 'false' branch (when 'err_71 != -1')... ->-+ | | 'main': events 12-14 | | |+------------------------------------------------------------------+ 118 || SOCKET_ERR(err, "listen"); || ^ || | |+-------------------------------->(12) ...to here ...... 128 | gnutls_credentials_set(session, GNUTLS_CRD_PSK, psk_cred); | ~ | | | (13) if 'gnutls_credentials_set' throws an exception... | (14) 'listen_sd_62' leaks here ex-serv-psk.c:132:17: warning: leak of file descriptor 'listen_sd_62' [CWE-775] [-Wanalyzer-fd-leak] 132 | gnutls_certificate_server_set_request(session, | ^ 'tcp_connect': events 1-4 32 | sd = socket(AF_INET, SOCK_STREAM, 0); | ^ | | | (1) socket created here | (2) when 'socket' succeeds ...... 39 | err = connect(sd, (struct sockaddr *)&sa, sizeof(sa)); | ~ | | | (3) if 'connect' throws an exception... | (4) 'sd_5' leaks here 'main': events 1-5 69 | if (gnutls_check_version("3.1.4") == NULL) { | ^ | | | (1) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 76 || gnutls_global_init(); || ~ || | |+------->(2) ...to here ...... 104 | listen_sd = socket(AF_INET, SOCK_STREAM, 0); | ~ | | | (3) socket created here | (4) when 'socket' succeeds 105 | SOCKET_ERR(listen_sd, "socket"); | ~ | | | (5) following 'false' branch (when 'listen_sd_62 != -1')... ->-+ | | 'main': events 6-7 | | |+-----------------------------------------------------------------------+ 105 || SOCKET_ERR(listen_sd, "socket"); || ^ || | |+-------------------------------------->(6) ...to here ...... 116 | SOCKET_ERR(err, "bind"); | ~ | | | (7) following 'false' branch (when 'err_69 != -1')... ->-+ | | 'main': events 8-11 | | |+-----------------------------------------------------------------+ 116 || SOCKET_ERR(err, "bind"); || ^ || | |+------------------------------>(8) ...to here 117 | err = listen(listen_sd, 1024); | ~ | | | (9) stream socket marked as passive here via 'listen' | (10) when 'listen' succeeds 118 | SOCKET_ERR(err, "listen"); | ~ | | | (11) following 'false' branch (when 'err_71 != -1')... ->-+ | | 'main': events 12-14 | | |+------------------------------------------------------------------+ 118 || SOCKET_ERR(err, "listen"); || ^ || | |+-------------------------------->(12) ...to here ...... 132 | gnutls_certificate_server_set_request(session, | ~ | | | (13) if 'gnutls_certificate_server_set_request' throws an exception... | (14) 'listen_sd_62' leaks here ex-serv-psk.c:135:22: warning: leak of file descriptor 'listen_sd_62' [CWE-775] [-Wanalyzer-fd-leak] 135 | sd = accept(listen_sd, (struct sockaddr *)&sa_cli, &client_len); | ^ 'main': events 1-5 69 | if (gnutls_check_version("3.1.4") == NULL) { | ^ | | | (1) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 76 || gnutls_global_init(); || ~ || | |+------->(2) ...to here ...... 104 | listen_sd = socket(AF_INET, SOCK_STREAM, 0); | ~ | | | (3) socket created here | (4) when 'socket' succeeds 105 | SOCKET_ERR(listen_sd, "socket"); | ~ | | | (5) following 'false' branch (when 'listen_sd_62 != -1')... ->-+ | | 'main': events 6-7 | | |+-----------------------------------------------------------------------+ 105 || SOCKET_ERR(listen_sd, "socket"); || ^ || | |+-------------------------------------->(6) ...to here ...... 116 | SOCKET_ERR(err, "bind"); | ~ | | | (7) following 'false' branch (when 'err_69 != -1')... ->-+ | | 'main': events 8-11 | | |+-----------------------------------------------------------------+ 116 || SOCKET_ERR(err, "bind"); || ^ || | |+------------------------------>(8) ...to here 117 | err = listen(listen_sd, 1024); | ~ | | | (9) stream socket marked as passive here via 'listen' | (10) when 'listen' succeeds 118 | SOCKET_ERR(err, "listen"); | ~ | | | (11) following 'false' branch (when 'err_71 != -1')... ->-+ | | 'main': events 12-14 | | |+------------------------------------------------------------------+ 118 || SOCKET_ERR(err, "listen"); || ^ || | |+-------------------------------->(12) ...to here ...... 135 | sd = accept(listen_sd, (struct sockaddr *)&sa_cli, &client_len); | ~ | | | (13) if 'accept' throws an exception... | (14) 'listen_sd_62' leaks here tcp.c: In function 'tcp_connect': tcp.c:39:15: warning: leak of file descriptor 'sd_5' [CWE-775] [-Wanalyzer-fd-leak] 39 | err = connect(sd, (struct sockaddr *)&sa, sizeof(sa)); | ^ 'tcp_connect': events 1-4 32 | sd = socket(AF_INET, SOCK_STREAM, 0); | ^ | | | (1) socket created here | (2) when 'socket' succeeds ...... 39 | err = connect(sd, (struct sockaddr *)&sa, sizeof(sa)); | ~ | | | (3) if 'connect' throws an exception... | (4) 'sd_5' leaks here ex-client-resume.c: In function 'main': ex-client-resume.c:73:25: warning: use of uninitialized value 'sdata.data' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 73 | CHECK(gnutls_session_set_data(session, sdata.data, | ^ 'main': events 1-7 | | 33 | int main(void) | | ^ | | | | | (1) entry to 'main' |...... | 44 | gnutls_datum_t sdata; | | ~ | | | | | (2) region created on stack here |...... | 47 | CHECK(gnutls_global_init()); | | ~ | | | | | (3) following 'true' branch... ->-+ | | | | | | | |+------------------------------------------+ | 48 || | 49 || CHECK(gnutls_certificate_allocate_credentials(&xcred)); | || ~ | || | | |+------->(4) ...to here | | (5) following 'true' branch... ->-+ | | | | | | | |+------------------------------------------+ | 50 || CHECK(gnutls_certificate_set_x509_system_trust(xcred)); | || ~ | || | | |+------->(6) ...to here | | (7) following 'true' branch... ->-+ | | | | 'main': events 8-11 | | | | | |+------------------------------------------+ | 50 || CHECK(gnutls_certificate_set_x509_system_trust(xcred)); | || ^ | || | | |+------->(8) ...to here | 51 | | 52 | for (t = 0; t < 2; t++) { /* connect 2 times to the server */ | | ~ | | | | | (9) following 'true' branch (when 't_36 != 2')... ->-+ | | | | | | | |+---------------------------------------------------------------------------+ | 53 || | 54 || sd = tcp_connect(); | || ~ ~ | || | | | || | (11) calling 'tcp_connect' from 'main' | |+--------------->(10) ...to here | +--> 'tcp_connect': events 12-15 | |tcp.c:23:12: | 23 | extern int tcp_connect(void) | | ^ | | | | | (12) entry to 'tcp_connect' |...... | 32 | sd = socket(AF_INET, SOCK_STREAM, 0); | | ~ | | | | | (13) when 'socket' fails |...... | 40 | if (err < 0) { | | ~ | | | | | (14) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 45 || return sd; | || ~ | || | | |+------->(15) ...to here | <------+ | 'main': events 16-23 | |ex-client-resume.c:54:22: | 54 | sd = tcp_connect(); | | ^ | | | | | (16) returning to 'main' from 'tcp_connect' | 55 | | 56 | CHECK(gnutls_init(&session, GNUTLS_CLIENT)); | | ~ | | | | | (17) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------+ | 57 || | 58 || CHECK(gnutls_server_name_set(session, GNUTLS_NAME_DNS, | || ~ | || | | |+--------------->(18) ...to here | | (19) following 'true' branch... ->-+ | | | |...... | | | | |+---------------------------------------------------+ | 61 || gnutls_session_set_verify_cert(session, "www.example.com", 0); | || ~ | || | | |+--------------->(20) ...to here | 62 | | 63 | CHECK(gnutls_set_default_priority(session)); | | ~ | | | | | (21) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------+ | 64 || | 65 || gnutls_transport_set_int(session, sd); | || ~ | || | | |+--------------->(22) ...to here |...... | 71 | if (t > 0) { | | ~ | | | | | (23) following 'false' branch (when 't_36 != 1')... ->-+ | | | | 'main': events 24-29 | | | | | |+--------------------------------------------------------------------------+ | 52 || for (t = 0; t < 2; t++) { /* connect 2 times to the server */ | || ~ | || | | || (27) following 'true' branch (when 't_36 != 2')... ->-+ | || | | || | | |+----------------------------------------------------------------------------+ | 53 || | 54 || sd = tcp_connect(); | || ~ ~ | || | | | || | (29) calling 'tcp_connect' from 'main' | |+--------------->(28) ...to here |...... | 71 | if (t > 0) { | | ^ | | | | |+------------------>(24) ...to here |...... | 84 | if (ret < 0) { | | ~ | | | | | (25) following 'true' branch... ->-+ | | | | | | | |+------------------------------------------------------+ | 85 || fprintf(stderr, "*** Handshake failed\n"); | || ~ | || | | |+----------------------->(26) ...to here | +--> 'tcp_connect': events 30-33 | |tcp.c:23:12: | 23 | extern int tcp_connect(void) | | ^ | | | | | (30) entry to 'tcp_connect' |...... | 32 | sd = socket(AF_INET, SOCK_STREAM, 0); | | ~ | | | | | (31) when 'socket' fails |...... | 40 | if (err < 0) { | | ~ | | | | | (32) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 45 || return sd; | || ~ | || | | |+------->(33) ...to here | <------+ | 'main': events 34-41 | |ex-client-resume.c:54:22: | 54 | sd = tcp_connect(); | | ^ | | | | | (34) returning to 'main' from 'tcp_connect' | 55 | | 56 | CHECK(gnutls_init(&session, GNUTLS_CLIENT)); | | ~ | | | | | (35) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------+ | 57 || | 58 || CHECK(gnutls_server_name_set(session, GNUTLS_NAME_DNS, | || ~ | || | | |+--------------->(36) ...to here | | (37) following 'true' branch... ->-+ | | | |...... | | | | |+---------------------------------------------------+ | 61 || gnutls_session_set_verify_cert(session, "www.example.com", 0); | || ~ | || | | |+--------------->(38) ...to here | 62 | | 63 | CHECK(gnutls_set_default_priority(session)); | | ~ | | | | | (39) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------------------+ | 64 || | 65 || gnutls_transport_set_int(session, sd); | || ~ | || | | |+--------------->(40) ...to here |...... | 73 | CHECK(gnutls_session_set_data(session, sdata.data, | | ~ | | | | | (41) use of uninitialized value 'sdata.data' here | ../../gl/read-file.c: In function '_gnutls_fread_file': ../../gl/read-file.c:198:13: warning: leak of FILE 'fopen (filename_11(D), mode_4)' [CWE-775] [-Wanalyzer-file-leak] 198 | if (flags & RF_SENSITIVE) | ^ '_gnutls_read_file': events 1-6 | | 190 | read_file (const char *filename, int flags, size_t *length) | | ^ | | | | | (1) entry to '_gnutls_read_file' |...... | 193 | FILE *stream = fopen (filename, mode); | | ~ | | | | | (2) opened here | 194 | | 195 | if (!stream) | | ~ | | | | | (3) assuming 'fopen (filename_11(D), mode_4)' is non-NULL | | (4) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 198 || if (flags & RF_SENSITIVE) | || ~ | || | | |+->(5) ...to here |...... | 201 | char *out = fread_file (stream, flags, length); | | ~ | | | | | (6) calling '_gnutls_fread_file' from '_gnutls_read_file' | +--> '_gnutls_fread_file': events 7-10 | | 52 | fread_file (FILE *stream, int flags, size_t *length) | | ^ | | | | | (7) entry to '_gnutls_fread_file' |...... | 61 | if (fstat (fileno (stream), &st) >= 0 && S_ISREG (st.st_mode)) | | ~ | | | | | (8) following 'true' branch... ->-+ | | | | | | | |+-----------------------------------------+ | 62 || { | 63 || off_t pos = ftello (stream); | || ~ ~ | || | | | || | (10) if 'ftello' throws an exception... | |+------->(9) ...to here | '_gnutls_read_file': event 11 | | 198 | if (flags & RF_SENSITIVE) | | ^ | | | | | (11) 'fopen (filename_11(D), mode_4)' leaks here; was opened at (2) | In function 'rpl_fcntl_DUPFD', inlined from 'rpl_fcntl' at ../../gl/fcntl.c:217:18: ../../gl/fcntl.c:479:12: warning: missing call to 'va_end' [-Wanalyzer-va-list-leak] 479 | result = fcntl (fd, F_DUPFD, target); | ^ 'rpl_fcntl': events 1-5 | | 202 | fcntl (int fd, int action, /* arg */...) | | ^ | | | | | (1) entry to 'rpl_fcntl' |...... | 209 | va_start (arg, action); | | ~ | | | | | (2) 'va_start' called here |...... | 212 | switch (action) | | ~ | | | | | (3) following 'case 0:' branch... ->-+ | | | | | | | |+---------------------------------------+ | 213 || { | 214 || case F_DUPFD: | || ~ | || | | |+--->(4) ...to here |...... | 217 | result = rpl_fcntl_DUPFD (fd, target); | | ~ | | | | | (5) inlined call to 'rpl_fcntl_DUPFD' from 'rpl_fcntl' | +--> 'rpl_fcntl_DUPFD': events 6-7 | | 479 | result = fcntl (fd, F_DUPFD, target); | | ^ | | | | | (6) if 'fcntl' throws an exception... | | (7) missing call to 'va_end' to match 'va_start' at (2) | ../../gl/fcntl.c: In function 'rpl_fcntl': ../../gl/fcntl.c:329:22: warning: missing call to 'va_end' [-Wanalyzer-va-list-leak] 329 | result = fcntl (fd, action); | ^ 'rpl_fcntl': events 1-7 209 | va_start (arg, action); | ^ | | | (1) 'va_start' called here ...... 212 | switch (action) | ~ | | | (2) following 'default:' branch... ->-+ | | ...... | | |+----------------------------------------+ 257 || default: || ~ || | |+--->(3) ...to here ...... 260 | switch (action) | ~ | | | (4) following 'case 1:, case 3:, case 9:, case 11:, case 1025:, case 1032:, case 1034:' branch... ->-+ | | ...... | | |+-------------------------------------------------------------------------------------------------------------+ 287 || case F_GETFD: || ~ || | |+--------->(5) ...to here ...... 329 | result = fcntl (fd, action); | ~ | | | (6) if 'fcntl' throws an exception... | (7) missing call to 'va_end' to match 'va_start' at (1) ../../gl/fcntl.c:419:24: warning: missing call to 'va_end' [-Wanalyzer-va-list-leak] 419 | result = fcntl (fd, action, x); | ^ 'rpl_fcntl': events 1-7 209 | va_start (arg, action); | ^ | | | (1) 'va_start' called here ...... 212 | switch (action) | ~ | | | (2) following 'default:' branch... ->-+ | | ...... | | |+----------------------------------------+ 257 || default: || ~ || | |+--->(3) ...to here ...... 260 | switch (action) | ~ | | | (4) following 'case 2:, case 4:, case 8:, case 10:, case 1024:, case 1026:, case 1031:, case 1033:' branch... ->-+ | | ...... | | |+-------------------------------------------------------------------------------------------------------------------------+ 333 || case F_ADD_SEALS: || ~ || | |+--------->(5) ...to here ...... 419 | result = fcntl (fd, action, x); | ~ | | | (6) if 'fcntl' throws an exception... | (7) missing call to 'va_end' to match 'va_start' at (1) ../../gl/fcntl.c:427:24: warning: missing call to 'va_end' [-Wanalyzer-va-list-leak] 427 | result = fcntl (fd, action, p); | ^ 'rpl_fcntl': events 1-7 209 | va_start (arg, action); | ^ | | | (1) 'va_start' called here ...... 212 | switch (action) | ~ | | | (2) following 'default:' branch... ->-+ | | ...... | | |+----------------------------------------+ 257 || default: || ~ || | |+--->(3) ...to here ...... 260 | switch (action) | ~ | | | (4) following 'default:' branch... ->-+ | | ...... | | |+----------------------------------------------+ 423 || default: || ~ || | |+--------->(5) ...to here ...... 427 | result = fcntl (fd, action, p); | ~ | | | (6) if 'fcntl' throws an exception... | (7) missing call to 'va_end' to match 'va_start' at (1) In function 'rpl_fcntl_DUPFD', inlined from 'rpl_fcntl_DUPFD_CLOEXEC' at ../../gl/fcntl.c:520:20: ../../gl/fcntl.c:479:12: warning: missing call to 'va_end' [-Wanalyzer-va-list-leak] 479 | result = fcntl (fd, F_DUPFD, target); | ^ 'rpl_fcntl': events 1-5 | | 202 | fcntl (int fd, int action, /* arg */...) | | ^ | | | | | (1) entry to 'rpl_fcntl' |...... | 209 | va_start (arg, action); | | ~ | | | | | (2) 'va_start' called here |...... | 212 | switch (action) | | ~ | | | | | (3) following 'case 1030:' branch... ->-+ | | | |...... | | | | |+------------------------------------------+ | 221 || case F_DUPFD_CLOEXEC: | || ~ | || | | |+--->(4) ...to here |...... | 224 | result = rpl_fcntl_DUPFD_CLOEXEC (fd, target); | | ~ | | | | | (5) calling 'rpl_fcntl_DUPFD_CLOEXEC' from 'rpl_fcntl' | +--> 'rpl_fcntl_DUPFD_CLOEXEC': events 6-11 | | 485 | rpl_fcntl_DUPFD_CLOEXEC (int fd, int target) | | ^ | | | | | (6) entry to 'rpl_fcntl_DUPFD_CLOEXEC' |...... | 507 | if (0 <= have_dupfd_cloexec) | | ~ | | | | | (7) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------+ | 508 || { | 509 || result = fcntl (fd, F_DUPFD_CLOEXEC, target); | || ~ | || | | |+----->(8) ...to here | 510 | if (0 <= result || errno != EINVAL) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | |...... | | | | |+--------------------------------------------+ | 520 || result = rpl_fcntl_DUPFD (fd, target); | || ~ ~ | || | | | || | (11) inlined call to 'rpl_fcntl_DUPFD' from 'rpl_fcntl_DUPFD_CLOEXEC' | |+--------->(10) ...to here | +--> 'rpl_fcntl_DUPFD': events 12-13 | | 479 | result = fcntl (fd, F_DUPFD, target); | | ^ | | | | | (12) if 'fcntl' throws an exception... | | (13) missing call to 'va_end' to match 'va_start' at (2) | ../../gl/fcntl.c: In function 'rpl_fcntl_DUPFD_CLOEXEC': ../../gl/fcntl.c:509:16: warning: missing call to 'va_end' [-Wanalyzer-va-list-leak] 509 | result = fcntl (fd, F_DUPFD_CLOEXEC, target); | ^ 'rpl_fcntl': events 1-5 | | 202 | fcntl (int fd, int action, /* arg */...) | | ^ | | | | | (1) entry to 'rpl_fcntl' |...... | 209 | va_start (arg, action); | | ~ | | | | | (2) 'va_start' called here |...... | 212 | switch (action) | | ~ | | | | | (3) following 'case 1030:' branch... ->-+ | | | |...... | | | | |+------------------------------------------+ | 221 || case F_DUPFD_CLOEXEC: | || ~ | || | | |+--->(4) ...to here |...... | 224 | result = rpl_fcntl_DUPFD_CLOEXEC (fd, target); | | ~ | | | | | (5) calling 'rpl_fcntl_DUPFD_CLOEXEC' from 'rpl_fcntl' | +--> 'rpl_fcntl_DUPFD_CLOEXEC': events 6-10 | | 485 | rpl_fcntl_DUPFD_CLOEXEC (int fd, int target) | | ^ | | | | | (6) entry to 'rpl_fcntl_DUPFD_CLOEXEC' |...... | 507 | if (0 <= have_dupfd_cloexec) | | ~ | | | | | (7) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------+ | 508 || { | 509 || result = fcntl (fd, F_DUPFD_CLOEXEC, target); | || ~ ~ | || | | | || | (9) if 'fcntl' throws an exception... | || | (10) missing call to 'va_end' to match 'va_start' at (2) | |+----->(8) ...to here | In function 'rpl_fcntl_DUPFD', inlined from 'rpl_fcntl_DUPFD_CLOEXEC' at ../../gl/fcntl.c:527:14: ../../gl/fcntl.c:479:12: warning: missing call to 'va_end' [-Wanalyzer-va-list-leak] 479 | result = fcntl (fd, F_DUPFD, target); | ^ 'rpl_fcntl': events 1-5 | | 202 | fcntl (int fd, int action, /* arg */...) | | ^ | | | | | (1) entry to 'rpl_fcntl' |...... | 209 | va_start (arg, action); | | ~ | | | | | (2) 'va_start' called here |...... | 212 | switch (action) | | ~ | | | | | (3) following 'case 1030:' branch... ->-+ | | | |...... | | | | |+------------------------------------------+ | 221 || case F_DUPFD_CLOEXEC: | || ~ | || | | |+--->(4) ...to here |...... | 224 | result = rpl_fcntl_DUPFD_CLOEXEC (fd, target); | | ~ | | | | | (5) calling 'rpl_fcntl_DUPFD_CLOEXEC' from 'rpl_fcntl' | +--> 'rpl_fcntl_DUPFD_CLOEXEC': events 6-9 | | 485 | rpl_fcntl_DUPFD_CLOEXEC (int fd, int target) | | ^ | | | | | (6) entry to 'rpl_fcntl_DUPFD_CLOEXEC' |...... | 507 | if (0 <= have_dupfd_cloexec) | | ~ | | | | | (7) following 'false' branch... ->-+ | | | |...... | | | | |+----------------------------------------+ | 527 || result = rpl_fcntl_DUPFD (fd, target); | || ~ ~ | || | | | || | (9) inlined call to 'rpl_fcntl_DUPFD' from 'rpl_fcntl_DUPFD_CLOEXEC' | |+--->(8) ...to here | +--> 'rpl_fcntl_DUPFD': events 10-11 | | 479 | result = fcntl (fd, F_DUPFD, target); | | ^ | | | | | (10) if 'fcntl' throws an exception... | | (11) missing call to 'va_end' to match 'va_start' at (2) | ../../gl/fcntl.c: In function 'rpl_fcntl_DUPFD_CLOEXEC': ../../gl/fcntl.c:530:19: warning: missing call to 'va_end' [-Wanalyzer-va-list-leak] 530 | int flags = fcntl (result, F_GETFD); | ^ 'rpl_fcntl': events 1-5 | | 202 | fcntl (int fd, int action, /* arg */...) | | ^ | | | | | (1) entry to 'rpl_fcntl' |...... | 209 | va_start (arg, action); | | ~ | | | | | (2) 'va_start' called here |...... | 212 | switch (action) | | ~ | | | | | (3) following 'case 1030:' branch... ->-+ | | | |...... | | | | |+------------------------------------------+ | 221 || case F_DUPFD_CLOEXEC: | || ~ | || | | |+--->(4) ...to here |...... | 224 | result = rpl_fcntl_DUPFD_CLOEXEC (fd, target); | | ~ | | | | | (5) calling 'rpl_fcntl_DUPFD_CLOEXEC' from 'rpl_fcntl' | +--> 'rpl_fcntl_DUPFD_CLOEXEC': events 6-10 | | 485 | rpl_fcntl_DUPFD_CLOEXEC (int fd, int target) | | ^ | | | | | (6) entry to 'rpl_fcntl_DUPFD_CLOEXEC' |...... | 528 | if (0 <= result && have_dupfd_cloexec == -1) | | ~ | | | | | (7) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------+ | 529 || { | 530 || int flags = fcntl (result, F_GETFD); | || ~ ~ | || | | | || | (9) if 'fcntl' throws an exception... | || | (10) missing call to 'va_end' to match 'va_start' at (2) | |+----->(8) ...to here | ../../gl/fcntl.c:531:24: warning: missing call to 'va_end' [-Wanalyzer-va-list-leak] 531 | if (flags < 0 || fcntl (result, F_SETFD, flags | FD_CLOEXEC) == -1) | ^ 'rpl_fcntl': events 1-5 | | 202 | fcntl (int fd, int action, /* arg */...) | | ^ | | | | | (1) entry to 'rpl_fcntl' |...... | 209 | va_start (arg, action); | | ~ | | | | | (2) 'va_start' called here |...... | 212 | switch (action) | | ~ | | | | | (3) following 'case 1030:' branch... ->-+ | | | |...... | | | | |+------------------------------------------+ | 221 || case F_DUPFD_CLOEXEC: | || ~ | || | | |+--->(4) ...to here |...... | 224 | result = rpl_fcntl_DUPFD_CLOEXEC (fd, target); | | ~ | | | | | (5) calling 'rpl_fcntl_DUPFD_CLOEXEC' from 'rpl_fcntl' | +--> 'rpl_fcntl_DUPFD_CLOEXEC': events 6-9 | | 485 | rpl_fcntl_DUPFD_CLOEXEC (int fd, int target) | | ^ | | | | | (6) entry to 'rpl_fcntl_DUPFD_CLOEXEC' |...... | 528 | if (0 <= result && have_dupfd_cloexec == -1) | | ~ | | | | | (7) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------+ | 529 || { | 530 || int flags = fcntl (result, F_GETFD); | || ~ | || | | |+----->(8) ...to here | 531 | if (flags < 0 || fcntl (result, F_SETFD, flags | FD_CLOEXEC) == -1) | | ~ | | | | | (9) following 'false' branch... ->-+ | | | | 'rpl_fcntl_DUPFD_CLOEXEC': events 10-12 | | | | | |+--------------------------------------------+ | 531 || if (flags < 0 || fcntl (result, F_SETFD, flags | FD_CLOEXEC) == -1) | || ^ | || | | |+---------------------->(10) ...to here | | (11) if 'fcntl' throws an exception... | | (12) missing call to 'va_end' to match 'va_start' at (2) | ../../gl/fcntl.c:534:11: warning: missing call to 'va_end' [-Wanalyzer-va-list-leak] 534 | close (result); | ^ 'rpl_fcntl': events 1-5 | | 202 | fcntl (int fd, int action, /* arg */...) | | ^ | | | | | (1) entry to 'rpl_fcntl' |...... | 209 | va_start (arg, action); | | ~ | | | | | (2) 'va_start' called here |...... | 212 | switch (action) | | ~ | | | | | (3) following 'case 1030:' branch... ->-+ | | | |...... | | | | |+------------------------------------------+ | 221 || case F_DUPFD_CLOEXEC: | || ~ | || | | |+--->(4) ...to here |...... | 224 | result = rpl_fcntl_DUPFD_CLOEXEC (fd, target); | | ~ | | | | | (5) calling 'rpl_fcntl_DUPFD_CLOEXEC' from 'rpl_fcntl' | +--> 'rpl_fcntl_DUPFD_CLOEXEC': events 6-10 | | 485 | rpl_fcntl_DUPFD_CLOEXEC (int fd, int target) | | ^ | | | | | (6) entry to 'rpl_fcntl_DUPFD_CLOEXEC' |...... | 528 | if (0 <= result && have_dupfd_cloexec == -1) | | ~ | | | | | (7) following 'true' branch... ->-+ | | | | | | | |+---------------------------------------+ | 529 || { | 530 || int flags = fcntl (result, F_GETFD); | || ~ | || | | |+----->(8) ...to here |...... | 534 | close (result); | | ~ | | | | | (9) if 'close' throws an exception... | | (10) missing call to 'va_end' to match 'va_start' at (2) | tlsproxy/tlsproxy.c: In function 'connecttoaddress': tlsproxy/tlsproxy.c:156:29: warning: leak of file descriptor 'fd_41' [CWE-775] [-Wanalyzer-fd-leak] 156 | if (connect(fd, rp->ai_addr, rp->ai_addrlen) == 0) | ^ 'connecttoaddress': event 1 137 | if (colon) { | ^ | | | (1) following 'false' branch (when 'colon_30' is NULL)... ->-+ | | 'connecttoaddress': events 2-12 | | |+------------------------------------------------------------------------+ 137 || if (colon) { || ^ || | |+---------->(2) ...to here ...... 146 | if (s != 0) { | ~ | | | (3) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 153 || for (rp = result; rp != NULL; rp = rp->ai_next) { || ~ ~ || | | |+------->(4) ...to here (5) following 'true' branch (when 'rp_14' is non-NULL)... ->-+ | | | | |+------------------------------------------------------------------------------------------+ 154 || fd = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol); || ~ ~ || | | || | (7) socket created here || | (8) when 'socket' succeeds |+--------------->(6) ...to here 155 | if (fd >= 0) { | ~ | | | (9) following 'true' branch (when 'fd_41 >= 0')... ->-+ | | | | |+-------------------------------------------------------------------------+ 156 || if (connect(fd, rp->ai_addr, rp->ai_addrlen) == 0) || ~ ~ || | | || | (11) if 'connect' throws an exception... || | (12) 'fd_41' leaks here |+----------------------->(10) ...to here tlsproxy/tlsproxy.c: In function 'bindtoaddress': tlsproxy/tlsproxy.c:113:17: warning: leak of file descriptor 'fd_16' [CWE-775] [-Wanalyzer-fd-leak] 113 | close(fd); | ^ 'bindtoaddress': event 1 74 | if (colon) { | ^ | | | (1) following 'false' branch (when 'colon_29' is NULL)... ->-+ | | 'bindtoaddress': events 2-16 | | |+------------------------------------------------------------------------+ 74 || if (colon) { || ^ || | |+---------->(2) ...to here ...... 80 | if (s != 0) { | ~ | | | (3) following 'false' branch... ->-+ | | ...... | | |+----------------------------------------------+ 88 || for (rp = result; rp != NULL; rp = rp->ai_next) { || ~ ~ || | | |+------->(4) ...to here (5) following 'true' branch (when 'rp_14' is non-NULL)... ->-+ | | | | |+------------------------------------------------------------------------------------------+ 89 || fd = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol); || ~ ~ || | | || | (7) socket created here || | (8) when 'socket' succeeds |+--------------->(6) ...to here 90 | 91 | if (fd >= 0) { | ~ | | | (9) following 'true' branch (when 'fd_38 >= 0')... ->-+ | | | | |+-------------------------------------------------------------------------+ 92 || int one = 1; || ~ || | |+----------------------->(10) ...to here ...... 98 | if (bind(fd, rp->ai_addr, rp->ai_addrlen) == 0) | ~ | | | (11) following 'true' branch... ->-+ | | ...... | | |+--------------------------------------------------------------+ 104 || if (!rp) { || ~ || | || (13) following 'false' branch (when 'rp_28' is non-NULL)... ->-+ || | ...... || | |+--------------------------------------------------------------------------+ 110 || freeaddrinfo(result); /* No longer needed */ || ~ || | |+------->(14) ...to here 111 | 112 | if (listen(fd, 5) < 0) { | ~ | | | (15) stream socket bound here | (16) when 'listen' fails ...... 118 | } | ~ | | |+(12) ...to here 'bindtoaddress': events 17-20 112 | if (listen(fd, 5) < 0) { | ^ | | | (17) following 'true' branch... ->-+ | | | | |+----------------------------------------------+ 113 || close(fd); || ~ || | |+--------------->(18) ...to here | (19) if 'close' throws an exception... | (20) 'fd_16' leaks here tlsproxy/crypto-gnutls.c: In function 'errout': tlsproxy/crypto-gnutls.c:89:15: warning: missing call to 'va_end' [-Wanalyzer-va-list-leak] 89 | ret = s->erroutfn(s->opaque, format, ap); | ^ 'errout': events 1-3 88 | va_start(ap, format); | ^ | | | (1) 'va_start' called here 89 | ret = s->erroutfn(s->opaque, format, ap); | ~ | | | (2) if the called function throws an exception... | (3) missing call to 'va_end' to match 'va_start' at (1) tlsproxy/crypto-gnutls.c: In function 'debugout': tlsproxy/crypto-gnutls.c:100:23: warning: missing call to 'va_end' [-Wanalyzer-va-list-leak] 100 | ret = s->erroutfn(s->opaque, format, ap); | ^ 'debugout': events 1-5 98 | va_start(ap, format); | ^ | | | (1) 'va_start' called here 99 | if (s->debug) | ~ | | | (2) following 'true' branch... ->-+ | | | | |+---------------------------------------------+ 100 || ret = s->erroutfn(s->opaque, format, ap); || ~ ~ || | | || | (4) if the called function throws an exception... || | (5) missing call to 'va_end' to match 'va_start' at (1) |+--------------->(3) ...to here tlsproxy/buffer.c: In function 'bufIsEmpty': tlsproxy/buffer.c:187:17: warning: dereference of NULL 'b_2(D)' [CWE-476] [-Wanalyzer-null-dereference] 187 | return b->empty; | ^ 'tlssession_mainloop': events 1-2 | |tlsproxy/crypto-gnutls.c:293:5: | 293 | int tlssession_mainloop(int cryptfd, int plainfd, tlssession_t *s) | | ^ | | | | | (1) entry to 'tlssession_mainloop' |...... | 303 | buffer_t *plainToCrypt = bufNew(BUF_SIZE, BUF_HWM); | | ~ | | | | | (2) calling 'bufNew' from 'tlssession_mainloop' | +--> 'bufNew': events 3-4 | |tlsproxy/buffer.c:78:11: | 78 | buffer_t *bufNew(ssize_t size, ssize_t hwm) | | ^ | | | | | (3) entry to 'bufNew' |...... | 81 | if (!b) | | ~ | | | | | (4) following 'true' branch (when 'b_6' is NULL)... ->-+ | | | | 'bufNew': event 5 | | | | | |+------------------------------------------------------------------+ | 81 || if (!b) | || ^ | || | | |+---------->(5) ...to here | <------+ | 'tlssession_mainloop': events 6-7 | |tlsproxy/crypto-gnutls.c:303:34: | 303 | buffer_t *plainToCrypt = bufNew(BUF_SIZE, BUF_HWM); | | ^ | | | | | (6) returning to 'tlssession_mainloop' from 'bufNew' | 304 | buffer_t *cryptToPlain = bufNew(BUF_SIZE, BUF_HWM); | | ~ | | | | | (7) calling 'bufNew' from 'tlssession_mainloop' | +--> 'bufNew': events 8-11 | |tlsproxy/buffer.c:78:11: | 78 | buffer_t *bufNew(ssize_t size, ssize_t hwm) | | ^ | | | | | (8) entry to 'bufNew' | 79 | { | 80 | buffer_t *b = calloc(1, sizeof(buffer_t)); | | ~ | | | | | (9) allocated here | 81 | if (!b) | | ~ | | | | | (10) assuming 'b_6' is NULL | | (11) following 'true' branch (when 'b_6' is NULL)... ->-+ | | | | 'bufNew': event 12 | | | | | |+-------------------------------------------------------------------+ | 81 || if (!b) | || ^ | || | | |+---------->(12) ...to here | <------+ | 'tlssession_mainloop': events 13-14 | |tlsproxy/crypto-gnutls.c:304:34: | 304 | buffer_t *cryptToPlain = bufNew(BUF_SIZE, BUF_HWM); | | ^ | | | | | (13) returning to 'tlssession_mainloop' from 'bufNew' | 305 | | 306 | if (socksetnonblock(cryptfd, 0) < 0) { | | ~ | | | | | (14) calling 'socksetnonblock' from 'tlssession_mainloop' | +--> 'socksetnonblock': events 15-16 | | 105 | static int socksetnonblock(int fd, int nb) | | ^ | | | | | (15) entry to 'socksetnonblock' | 106 | { | 107 | int sf = fcntl(fd, F_GETFL, 0); | | ~ | | | | | (16) calling 'rpl_fcntl' from 'socksetnonblock' | +--> 'rpl_fcntl': events 17-21 | |../../gl/fcntl.c:202:1: | 202 | fcntl (int fd, int action, /* arg */...) | | ^ | | | | | (17) entry to 'rpl_fcntl' |...... | 212 | switch (action) | | ~ | | | | | (18) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 257 || default: | || ~ | || | | |+--->(19) ...to here |...... | 260 | switch (action) | | ~ | | | | | (20) following 'case 1:, case 3:, case 9:, case 11:, case 1025:, case 1032:, case 1034:' branch... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------------------------------------------------+ | 287 || case F_GETFD: | || ~ | || | | |+--------->(21) ...to here | <------+ | 'socksetnonblock': events 22-23 | |tlsproxy/crypto-gnutls.c:107:18: | 107 | int sf = fcntl(fd, F_GETFL, 0); | | ^ | | | | | (22) returning to 'socksetnonblock' from 'rpl_fcntl' |...... | 110 | return fcntl(fd, F_SETFL, nb ? (sf | O_NONBLOCK) : (sf & ~O_NONBLOCK)); | | ~ | | | | | (23) following 'false' branch (when 'nb_8(D) == 0')... ->-+ | | | | 'socksetnonblock': events 24-25 | | | | | |+-------------------------------------------------------------------------+ | 110 || return fcntl(fd, F_SETFL, nb ? (sf | O_NONBLOCK) : (sf & ~O_NONBLOCK)); | || ^ | || | | |+-------------->(24) ...to here | | (25) calling 'rpl_fcntl' from 'socksetnonblock' | +--> 'rpl_fcntl': events 26-30 | |../../gl/fcntl.c:202:1: | 202 | fcntl (int fd, int action, /* arg */...) | | ^ | | | | | (26) entry to 'rpl_fcntl' |...... | 212 | switch (action) | | ~ | | | | | (27) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 257 || default: | || ~ | || | | |+--->(28) ...to here |...... | 260 | switch (action) | | ~ | | | | | (29) following 'case 2:, case 4:, case 8:, case 10:, case 1024:, case 1026:, case 1031:, case 1033:' branch... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------------------------------------------------------------+ | 333 || case F_ADD_SEALS: | || ~ | || | | |+--------->(30) ...to here | <------+ | 'socksetnonblock': event 31 | |tlsproxy/crypto-gnutls.c:110:16: | 110 | return fcntl(fd, F_SETFL, nb ? (sf | O_NONBLOCK) : (sf & ~O_NONBLOCK)); | | ^ | | | | | (31) returning to 'socksetnonblock' from 'rpl_fcntl' | <------+ | 'tlssession_mainloop': event 32 | | 306 | if (socksetnonblock(cryptfd, 0) < 0) { | | ^ | | | | | (32) returning to 'tlssession_mainloop' from 'socksetnonblock' | 'tlssession_mainloop': events 33-37 | | 306 | if (socksetnonblock(cryptfd, 0) < 0) { | | ^ | | | | | (33) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 312 || gnutls_transport_set_ptr(s->session, | || ~ | || | | |+------->(34) ...to here |...... | 317 | if (ret < 0) { | | ~ | | | | | (35) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 322 || if (socksetnonblock(cryptfd, 1) < 0) { | || ~ ~ | || | | | || | (37) calling 'socksetnonblock' from 'tlssession_mainloop' | |+------->(36) ...to here | +--> 'socksetnonblock': events 38-39 | | 105 | static int socksetnonblock(int fd, int nb) | | ^ | | | | | (38) entry to 'socksetnonblock' | 106 | { | 107 | int sf = fcntl(fd, F_GETFL, 0); | | ~ | | | | | (39) calling 'rpl_fcntl' from 'socksetnonblock' | +--> 'rpl_fcntl': events 40-44 | |../../gl/fcntl.c:202:1: | 202 | fcntl (int fd, int action, /* arg */...) | | ^ | | | | | (40) entry to 'rpl_fcntl' |...... | 212 | switch (action) | | ~ | | | | | (41) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 257 || default: | || ~ | || | | |+--->(42) ...to here |...... | 260 | switch (action) | | ~ | | | | | (43) following 'case 1:, case 3:, case 9:, case 11:, case 1025:, case 1032:, case 1034:' branch... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------------------------------------------------+ | 287 || case F_GETFD: | || ~ | || | | |+--------->(44) ...to here | <------+ | 'socksetnonblock': events 45-46 | |tlsproxy/crypto-gnutls.c:107:18: | 107 | int sf = fcntl(fd, F_GETFL, 0); | | ^ | | | | | (45) returning to 'socksetnonblock' from 'rpl_fcntl' |...... | 110 | return fcntl(fd, F_SETFL, nb ? (sf | O_NONBLOCK) : (sf & ~O_NONBLOCK)); | | ~ | | | | | (46) following 'true' branch (when 'nb_8(D) != 0')... ->-+ | | | | 'socksetnonblock': events 47-48 | | | | | |+------------------------------------------------------------------------+ | 110 || return fcntl(fd, F_SETFL, nb ? (sf | O_NONBLOCK) : (sf & ~O_NONBLOCK)); | || ^ | || | | |+-------------->(47) ...to here | | (48) calling 'rpl_fcntl' from 'socksetnonblock' | +--> 'rpl_fcntl': events 49-53 | |../../gl/fcntl.c:202:1: | 202 | fcntl (int fd, int action, /* arg */...) | | ^ | | | | | (49) entry to 'rpl_fcntl' |...... | 212 | switch (action) | | ~ | | | | | (50) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 257 || default: | || ~ | || | | |+--->(51) ...to here |...... | 260 | switch (action) | | ~ | | | | | (52) following 'case 2:, case 4:, case 8:, case 10:, case 1024:, case 1026:, case 1031:, case 1033:' branch... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------------------------------------------------------------+ | 333 || case F_ADD_SEALS: | || ~ | || | | |+--------->(53) ...to here | <------+ | 'socksetnonblock': event 54 | |tlsproxy/crypto-gnutls.c:110:16: | 110 | return fcntl(fd, F_SETFL, nb ? (sf | O_NONBLOCK) : (sf & ~O_NONBLOCK)); | | ^ | | | | | (54) returning to 'socksetnonblock' from 'rpl_fcntl' | <------+ | 'tlssession_mainloop': event 55 | | 322 | if (socksetnonblock(cryptfd, 1) < 0) { | | ^ | | | | | (55) returning to 'tlssession_mainloop' from 'socksetnonblock' | 'tlssession_mainloop': events 56-58 | | 322 | if (socksetnonblock(cryptfd, 1) < 0) { | | ^ | | | | | (56) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 327 || if (socksetnonblock(plainfd, 1) < 0) { | || ~ ~ | || | | | || | (58) calling 'socksetnonblock' from 'tlssession_mainloop' | |+------->(57) ...to here | +--> 'socksetnonblock': events 59-60 | | 105 | static int socksetnonblock(int fd, int nb) | | ^ | | | | | (59) entry to 'socksetnonblock' | 106 | { | 107 | int sf = fcntl(fd, F_GETFL, 0); | | ~ | | | | | (60) calling 'rpl_fcntl' from 'socksetnonblock' | +--> 'rpl_fcntl': events 61-65 | |../../gl/fcntl.c:202:1: | 202 | fcntl (int fd, int action, /* arg */...) | | ^ | | | | | (61) entry to 'rpl_fcntl' |...... | 212 | switch (action) | | ~ | | | | | (62) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 257 || default: | || ~ | || | | |+--->(63) ...to here |...... | 260 | switch (action) | | ~ | | | | | (64) following 'case 1:, case 3:, case 9:, case 11:, case 1025:, case 1032:, case 1034:' branch... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------------------------------------------------+ | 287 || case F_GETFD: | || ~ | || | | |+--------->(65) ...to here | <------+ | 'socksetnonblock': events 66-67 | |tlsproxy/crypto-gnutls.c:107:18: | 107 | int sf = fcntl(fd, F_GETFL, 0); | | ^ | | | | | (66) returning to 'socksetnonblock' from 'rpl_fcntl' |...... | 110 | return fcntl(fd, F_SETFL, nb ? (sf | O_NONBLOCK) : (sf & ~O_NONBLOCK)); | | ~ | | | | | (67) following 'true' branch (when 'nb_8(D) != 0')... ->-+ | | | | 'socksetnonblock': events 68-69 | | | | | |+------------------------------------------------------------------------+ | 110 || return fcntl(fd, F_SETFL, nb ? (sf | O_NONBLOCK) : (sf & ~O_NONBLOCK)); | || ^ | || | | |+-------------->(68) ...to here | | (69) calling 'rpl_fcntl' from 'socksetnonblock' | +--> 'rpl_fcntl': events 70-74 | |../../gl/fcntl.c:202:1: | 202 | fcntl (int fd, int action, /* arg */...) | | ^ | | | | | (70) entry to 'rpl_fcntl' |...... | 212 | switch (action) | | ~ | | | | | (71) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 257 || default: | || ~ | || | | |+--->(72) ...to here |...... | 260 | switch (action) | | ~ | | | | | (73) following 'case 2:, case 4:, case 8:, case 10:, case 1024:, case 1026:, case 1031:, case 1033:' branch... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------------------------------------------------------------+ | 333 || case F_ADD_SEALS: | || ~ | || | | |+--------->(74) ...to here | <------+ | 'socksetnonblock': event 75 | |tlsproxy/crypto-gnutls.c:110:16: | 110 | return fcntl(fd, F_SETFL, nb ? (sf | O_NONBLOCK) : (sf & ~O_NONBLOCK)); | | ^ | | | | | (75) returning to 'socksetnonblock' from 'rpl_fcntl' | <------+ | 'tlssession_mainloop': event 76 | | 327 | if (socksetnonblock(plainfd, 1) < 0) { | | ^ | | | | | (76) returning to 'tlssession_mainloop' from 'socksetnonblock' | 'tlssession_mainloop': events 77-79 | | 327 | if (socksetnonblock(plainfd, 1) < 0) { | | ^ | | | | | (77) following 'false' branch... ->-+ | | | |...... | | | | |+-----------------------------------------------+ | 332 || maxfd = (plainfd > cryptfd) ? plainfd + 1 : cryptfd + 1; | || ~ | || | | |+------->(78) ...to here | 333 | | 334 | while ((!plainEOF || !cryptEOF) && !quit(s)) { | | ~ | | | | | (79) following 'true' branch... ->-+ | | | | 'tlssession_mainloop': events 80-81 | | | | | |+---------------------------------------------------------------------------+ | 334 || while ((!plainEOF || !cryptEOF) && !quit(s)) { | || ^ | || | | |+--------------------------------------->(80) ...to here |...... | 340 | FD_ZERO(&readfds); | | ~ | | | | | (81) following 'true' branch... ->-+ | | | | 'tlssession_mainloop': events 82-83 | | | | | |+---------------------------------------------------+ | 340 || FD_ZERO(&readfds); | || ^ | || | | |+--------------->(82) ...to here | 341 | FD_ZERO(&writefds); | | ~ | | | | | (83) following 'true' branch... ->-+ | | | | 'tlssession_mainloop': events 84-85 | | | | | |+---------------------------------------------------+ | 341 || FD_ZERO(&writefds); | || ^ | || | | |+--------------->(84) ...to here | | (85) following 'false' branch (when '__i_92 == 16')... ->-+ | | | | 'tlssession_mainloop': events 86-89 | | | | | |+--------------------------------------------------------------------------+ | 341 || FD_ZERO(&writefds); | || ^ | || | | |+--------------->(86) ...to here |...... | 347 | if (plainEOF) { | | ~ | | | | | (87) following 'false' branch (when 'plainEOF_84 == 0')... ->-+ | | | |...... | | | | |+---------------------------------------------------------------------------------+ | 355 || if (!bufIsEmpty(cryptToPlain)) | || ~ ~ | || | | | || | (89) calling 'bufIsEmpty' from 'tlssession_mainloop' | |+----------------------->(88) ...to here | +--> 'bufIsEmpty': events 90-91 | |tlsproxy/buffer.c:185:5: | 185 | int bufIsEmpty(buffer_t *b) | | ^ | | | | | (90) entry to 'bufIsEmpty' | 186 | { | 187 | return b->empty; | | ~ | | | | | (91) dereference of NULL 'b_2(D)' | tlsproxy/buffer.c: In function 'bufFree': tlsproxy/buffer.c:93:15: warning: dereference of NULL 'b_3(D)' [CWE-476] [-Wanalyzer-null-dereference] 93 | free(b->buf); | ^ 'tlssession_mainloop': events 1-2 | |tlsproxy/crypto-gnutls.c:293:5: | 293 | int tlssession_mainloop(int cryptfd, int plainfd, tlssession_t *s) | | ^ | | | | | (1) entry to 'tlssession_mainloop' |...... | 303 | buffer_t *plainToCrypt = bufNew(BUF_SIZE, BUF_HWM); | | ~ | | | | | (2) calling 'bufNew' from 'tlssession_mainloop' | +--> 'bufNew': events 3-6 | |tlsproxy/buffer.c:78:11: | 78 | buffer_t *bufNew(ssize_t size, ssize_t hwm) | | ^ | | | | | (3) entry to 'bufNew' | 79 | { | 80 | buffer_t *b = calloc(1, sizeof(buffer_t)); | | ~ | | | | | (4) allocated here | 81 | if (!b) | | ~ | | | | | (5) assuming 'b_6' is NULL | | (6) following 'true' branch (when 'b_6' is NULL)... ->-+ | | | | 'bufNew': event 7 | | | | | |+------------------------------------------------------------------+ | 81 || if (!b) | || ^ | || | | |+---------->(7) ...to here | <------+ | 'tlssession_mainloop': events 8-9 | |tlsproxy/crypto-gnutls.c:303:34: | 303 | buffer_t *plainToCrypt = bufNew(BUF_SIZE, BUF_HWM); | | ^ | | | | | (8) returning to 'tlssession_mainloop' from 'bufNew' | 304 | buffer_t *cryptToPlain = bufNew(BUF_SIZE, BUF_HWM); | | ~ | | | | | (9) calling 'bufNew' from 'tlssession_mainloop' | +--> 'bufNew': events 10-11 | |tlsproxy/buffer.c:78:11: | 78 | buffer_t *bufNew(ssize_t size, ssize_t hwm) | | ^ | | | | | (10) entry to 'bufNew' |...... | 81 | if (!b) | | ~ | | | | | (11) following 'true' branch (when 'b_6' is NULL)... ->-+ | | | | 'bufNew': event 12 | | | | | |+-------------------------------------------------------------------+ | 81 || if (!b) | || ^ | || | | |+---------->(12) ...to here | <------+ | 'tlssession_mainloop': events 13-14 | |tlsproxy/crypto-gnutls.c:304:34: | 304 | buffer_t *cryptToPlain = bufNew(BUF_SIZE, BUF_HWM); | | ^ | | | | | (13) returning to 'tlssession_mainloop' from 'bufNew' | 305 | | 306 | if (socksetnonblock(cryptfd, 0) < 0) { | | ~ | | | | | (14) calling 'socksetnonblock' from 'tlssession_mainloop' | +--> 'socksetnonblock': events 15-16 | | 105 | static int socksetnonblock(int fd, int nb) | | ^ | | | | | (15) entry to 'socksetnonblock' | 106 | { | 107 | int sf = fcntl(fd, F_GETFL, 0); | | ~ | | | | | (16) calling 'rpl_fcntl' from 'socksetnonblock' | +--> 'rpl_fcntl': events 17-21 | |../../gl/fcntl.c:202:1: | 202 | fcntl (int fd, int action, /* arg */...) | | ^ | | | | | (17) entry to 'rpl_fcntl' |...... | 212 | switch (action) | | ~ | | | | | (18) following 'default:' branch... ->-+ | | | |...... | | | | |+-----------------------------------------+ | 257 || default: | || ~ | || | | |+--->(19) ...to here |...... | 260 | switch (action) | | ~ | | | | | (20) following 'case 1:, case 3:, case 9:, case 11:, case 1025:, case 1032:, case 1034:' branch... ->-+ | | | |...... | | | | |+--------------------------------------------------------------------------------------------------------------+ | 287 || case F_GETFD: | || ~ | || | | |+--------->(21) ...to here | <------+ | 'socksetnonblock': event 22 | |tlsproxy/crypto-gnutls.c:107:18: | 107 | int sf = fcntl(fd, F_GETFL, 0); | | ^ | | | | | (22) returning to 'socksetnonblock' from 'rpl_fcntl' | <------+ | 'tlssession_mainloop': events 23-24 | | 306 | if (socksetnonblock(cryptfd, 0) < 0) { | | ^ | | | | | (23) returning to 'tlssession_mainloop' from 'socksetnonblock' |...... | 527 | bufFree(plainToCrypt); | | ~ | | | | | (24) calling 'bufFree' from 'tlssession_mainloop' | +--> 'bufFree': events 25-26 | |tlsproxy/buffer.c:91:6: | 91 | void bufFree(buffer_t *b) | | ^ | | | | | (25) entry to 'bufFree' | 92 | { | 93 | free(b->buf); | | ~ | | | | | (26) dereference of NULL 'b_3(D)' | ex-ocsp-client.c: In function 'load_cert': ex-ocsp-client.c:182:19: warning: 'size' may be used uninitialized [-Wmaybe-uninitialized] 182 | data.size = size; | ^ ex-ocsp-client.c:175:16: note: 'size' was declared here 175 | size_t size; | ^ make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/doc/examples' Making all in scripts make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.13/doc/scripts' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/doc/scripts' Making all in credentials make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.13/doc/credentials' Making all in srp make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.13/doc/credentials/srp' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/doc/credentials/srp' Making all in x509 make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.13/doc/credentials/x509' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/doc/credentials/x509' make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.13/doc/credentials' make[4]: Nothing to be done for 'all-am'. make[4]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/doc/credentials' make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/doc/credentials' Making all in latex make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.13/doc/latex' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/doc/latex' make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.13/doc' make[3]: Nothing to be done for 'all-am'. make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/doc' make[2]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/doc' make[2]: Entering directory '/build/gnutls/src/gnutls-3.8.13' make[2]: Leaving directory '/build/gnutls/src/gnutls-3.8.13' make[1]: Leaving directory '/build/gnutls/src/gnutls-3.8.13' ==> Starting check()... Making check in gl make[1]: Entering directory '/build/gnutls/src/gnutls-3.8.13/gl' make check-recursive make[2]: Entering directory '/build/gnutls/src/gnutls-3.8.13/gl' make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.13/gl' make[3]: Nothing to be done for 'check-am'. make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/gl' make[2]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/gl' make[1]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/gl' Making check in lib make[1]: Entering directory '/build/gnutls/src/gnutls-3.8.13/lib' make check-recursive make[2]: Entering directory '/build/gnutls/src/gnutls-3.8.13/lib' Making check in includes make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.13/lib/includes' make[3]: Nothing to be done for 'check'. make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/lib/includes' Making check in x509 make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.13/lib/x509' make check-am make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.13/lib/x509' make[4]: Nothing to be done for 'check-am'. make[4]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/lib/x509' make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/lib/x509' Making check in auth make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.13/lib/auth' make[3]: Nothing to be done for 'check'. make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/lib/auth' Making check in ext make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.13/lib/ext' make[3]: Nothing to be done for 'check'. make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/lib/ext' Making check in algorithms make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.13/lib/algorithms' make[3]: Nothing to be done for 'check'. make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/lib/algorithms' Making check in extras make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.13/lib/extras' make[3]: Nothing to be done for 'check'. make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/lib/extras' Making check in accelerated make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.13/lib/accelerated' make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.13/lib/accelerated' make[4]: Nothing to be done for 'check-am'. make[4]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/lib/accelerated' make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/lib/accelerated' Making check in hpke make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.13/lib/hpke' make[3]: Nothing to be done for 'check'. make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/lib/hpke' Making check in pkcs11 make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.13/lib/pkcs11' make[3]: Nothing to be done for 'check'. make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/lib/pkcs11' Making check in nettle make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.13/lib/nettle' make[3]: Nothing to be done for 'check'. make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/lib/nettle' make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.13/lib' make[3]: Nothing to be done for 'check-am'. make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/lib' make[2]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/lib' make[1]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/lib' Making check in extra make[1]: Entering directory '/build/gnutls/src/gnutls-3.8.13/extra' Making check in includes make[2]: Entering directory '/build/gnutls/src/gnutls-3.8.13/extra/includes' make[2]: Nothing to be done for 'check'. make[2]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/extra/includes' make[2]: Entering directory '/build/gnutls/src/gnutls-3.8.13/extra' make[2]: Nothing to be done for 'check-am'. make[2]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/extra' make[1]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/extra' Making check in po make[1]: Entering directory '/build/gnutls/src/gnutls-3.8.13/po' make[1]: Nothing to be done for 'check'. make[1]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/po' Making check in src/gl make[1]: Entering directory '/build/gnutls/src/gnutls-3.8.13/src/gl' make check-recursive make[2]: Entering directory '/build/gnutls/src/gnutls-3.8.13/src/gl' Making check in . make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.13/src/gl' make[3]: Nothing to be done for 'check-am'. make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/src/gl' Making check in tests make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.13/src/gl/tests' make check-recursive make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.13/src/gl/tests' Making check in . make[5]: Entering directory '/build/gnutls/src/gnutls-3.8.13/src/gl/tests' ## ---------------------------------------------------------------------- ## ## ---------------------------- Gnulib tests ---------------------------- ## ## Please report test failures in this directory to . ## ## ---------------------------------------------------------------------- ## make test-accept test-alignasof test-alloca-opt test-arpa_inet-h test-array_list test-assert test-binary-io test-bind test-bool test-btoc32 test-btowc test-byteswap test-c-ctype test-c-strcasecmp test-c-strncasecmp test-c32isalnum test-c32isalpha test-c32isblank test-c32iscntrl test-c32isdigit test-c32isgraph test-c32islower test-c32isprint test-c32ispunct test-c32isspace test-c32isupper test-c32isxdigit test-c32rtomb test-c32rtomb-w32 test-c32tolower test-c32width test-calloc-gnu test-calloc-posix test-canonicalize-lgpl test-cloexec test-close test-connect test-ctype-h test-dup2 test-endian test-environ test-errno-h test-error test-explicit_bzero test-fcntl-h test-fcntl test-fdopen test-fgetc test-float-h test-fopen-gnu test-fopen test-fpending test-fputc test-fread test-free test-frexp test-frexpl test-fseek test-fseeko test-fseeko3 test-fseeko4 test-fseterr test-fstat test-ftell test-ftell3 test-ftello test-ftello3 test-ftello4 test-ftruncate test-func test-fwrite test-getaddrinfo test-getcwd-lgpl test-getdelim test-getdtablesize test-getline test-getpeername test-getprogname test-gettext-h test-gettimeofday test-scratch-buffer test-hard-locale test-htonl test-ignore-value test-inet_ntop test-inet_pton test-intprops test-inttypes-h test-ioctl test-isblank test-isnand-nolibm test-isnanf-nolibm test-isnanl-nolibm test-iswblank test-iswdigit test-iswpunct test-iswxdigit test-largefile test-limits-h test-linked_list test-linkedhash_list test-listen test-locale-h test-localeconv test-localeconv-mt test-localename test-rwlock1 test-lock test-lseek test-lstat test-malloc-gnu test-malloc-posix test-malloca test-math-h test-mbrtoc32 test-mbrtoc32-w32 test-mbrtowc test-mbrtowc-w32 test-mbsinit test-mbsnlen test-memchr test-memset_explicit test-mkfifo test-nanosleep test-netdb-h test-netinet_in-h test-once1 test-once2 test-open test-parse-datetime test-pathmax test-perror test-perror2 test-pipe test-pselect test-pthread-cond test-pthread test-pthread-mutex test-pthread-mutex-type test-pthread-once1 test-pthread-once2 test-pthread-rwlock test-pthread-thread test-pthread_sigmask1 test-pthread_sigmask2 test-putenv test-raise test-random test-random-mt test-random_r test-rawmemchr test-rbtree_list test-read-file test-readlink test-realloc-posix test-reallocarray test-recv test-recvfrom test-sched-h test-select test-select-fd test-select-stdin test-send test-sendto test-servent test-setenv test-setlocale_null test-setlocale_null-mt-one test-setlocale_null-mt-all test-setlocale_null-unlocked test-setlocale1 test-setlocale2 test-setlocale-w32 test-setsockopt test-shutdown test-signal-h test-signbit test-sigprocmask test-sleep test-snprintf test-sockets test-stat test-stat-time test-stdckdint-h test-stddef-h test-stdint-h test-stdio-h test-stdlib-h test-str_endswith test-str_startswith test-strcasecmp test-strerror test-strerror_r test-string-h test-strings-h test-strncasecmp test-strncpy test-strndup test-strnlen test-strnul test-strverscmp test-symlink test-sys_ioctl-h test-sys_select-h test-sys_socket-h test-sys_stat-h test-sys_time-h test-sys_types-h test-sys_uio-h test-thread_self test-thread_create test-time-h test-time test-gmtime_r test-gmtime_r-mt test-localtime_r test-localtime_r-mt test-timespec test-tls test-trunc1 test-trunc2 test-truncl test-uchar-h test-unicase-h test-uc_tolower test-unictype-h test-ctype_alnum test-ctype_alpha test-ctype_blank test-ctype_cntrl test-ctype_digit test-ctype_graph test-ctype_lower test-ctype_print test-ctype_punct test-ctype_space test-ctype_upper test-ctype_xdigit test-uninorm-h test-unistd-h test-uniwidth-h test-uc_width test-uc_width2 test-unsetenv test-usleep test-vasnprintf test-vasprintf test-verify test-vsnprintf test-wchar-h test-wcrtomb test-wcrtomb-w32 test-wctype-h test-wcwidth test-windows-mutex-type test-windows-recmutex-type test-windows-timedmutex-type test-windows-timedrecmutex-type test-xalloc-die libtests.a make[6]: Entering directory '/build/gnutls/src/gnutls-3.8.13/src/gl/tests' CC test-accept.o CC test-alignasof.o CC test-alloca-opt.o CC test-arpa_inet-h.o CC test-array_list.o CC test-assert.o CC test-binary-io.o CC test-bind.o CC test-bool.o CC test-btoc32.o CC test-btowc.o CC test-byteswap.o CC test-c-ctype.o CC test-c-strcasecmp.o CC test-c-strncasecmp.o CC test-c32isalnum.o CC test-c32isalpha.o CC test-c32isblank.o CC test-c32iscntrl.o CC test-c32isdigit.o CC test-c32isgraph.o CC test-c32islower.o CC test-c32isprint.o CC test-c32isspace.o CC test-c32ispunct.o CC test-c32isupper.o CC test-c32isxdigit.o CC test-c32rtomb.o CC test-c32rtomb-w32.o CC test-c32tolower.o CC test-calloc-gnu.o CC test-c32width.o CC test-calloc-posix.o CC test-canonicalize-lgpl.o CC test-cloexec.o CC test-close.o CC test-connect.o CC test-ctype-h.o CC test-dup2.o CC test-endian.o CC test-environ.o CC test-errno-h.o CC test-error.o CC test-explicit_bzero.o CC test-fcntl-h.o CC test-fcntl.o CC test-fdopen.o CC test-fgetc.o CC test-float-h.o CC test-fopen-gnu.o CC test-fopen.o CC test-fpending.o CC test-fputc.o CC test-fread.o CC test-free.o CC test-frexp.o CC randomd.o CC test-frexpl.o CC randoml.o CC test-fseek.o CC test-fseeko.o CC test-fseeko3.o CC test-fseeko4.o CC test-fseterr.o CC test-fstat.o CC test-ftell.o CC test-ftell3.o CC test-ftello.o CC test-ftello3.o CC test-ftello4.o CC test-ftruncate.o CC test-func.o CC test-fwrite.o CC test-getaddrinfo.o CC test-getcwd-lgpl.o CC test-getdelim.o CC test-getdtablesize.o CC test-getline.o CC test-getpeername.o CC test-getprogname.o CC test-gettext-h.o CC test-gettimeofday.o CC test-scratch-buffer.o CC test-hard-locale.o CC test-htonl.o CC test-ignore-value.o CC test-inet_ntop.o CC test-inet_pton.o CC test-intprops.o CC test-inttypes-h.o CC test-ioctl.o CC test-isblank.o CC test-isnand-nolibm.o CC test-isnanf-nolibm.o CC test-isnanl-nolibm.o CC test-iswdigit.o CC test-iswblank.o CC test-iswpunct.o CC test-iswxdigit.o CC test-largefile.o CC test-limits-h.o CC test-linked_list.o CC test-linkedhash_list.o CC test-listen.o CC test-locale-h.o CC test-localeconv.o CC test-localeconv-mt.o CC test-localename.o CC test-rwlock1.o CC test-lock.o CC test-lseek.o CC test-lstat.o CC test-malloc-gnu.o CC test-malloc-posix.o CC test-malloca.o CC test-math-h.o CC test-mbrtoc32.o CC test-mbrtoc32-w32.o CC test-mbrtowc-w32.o CC test-mbrtowc.o CC test-mbsinit.o CC test-mbsnlen.o CC test-memchr.o CC test-memset_explicit.o CC test-mkfifo.o CC test-nanosleep.o CC test-netdb-h.o CC test-netinet_in-h.o CC test-open.o CC test-parse-datetime.o CC test-pathmax.o CC test-perror.o CC test-perror2.o CC test-pipe.o CC test-pselect.o CC test-once.o CC test-pthread-cond.o CC test-pthread.o CC test-pthread-mutex.o CC test-pthread-mutex-type.o CC test-pthread-once1.o CC test-pthread-once2.o CC test-pthread-rwlock.o CC test-pthread-thread.o CC test-pthread_sigmask1.o CC test-pthread_sigmask2.o CC test-putenv.o CC test-raise.o CC test-random.o CC test-random-mt.o CC test-random_r.o CC test-rawmemchr.o CC test-rbtree_list.o CC test-read-file.o CC test-readlink.o CC test-realloc-posix.o CC test-recv.o CC test-reallocarray.o CC test-recvfrom.o CC test-sched-h.o CC test-select.o CC test-select-fd.o CC test-select-stdin.o CC test-send.o CC test-servent.o CC test-sendto.o CC test-setenv.o CC test-setlocale_null.o CC test-setlocale_null-mt-one.o CC test-setlocale_null-unlocked.o CC test-setlocale_null-mt-all.o CC test-setlocale1.o CC test-setlocale2.o CC test-setlocale-w32.o CC test-setsockopt.o CC test-shutdown.o CC test-signal-h.o CC test-signbit.o CC test-sleep.o CC test-sigprocmask.o CC test-snprintf.o CC test-sockets.o CC test-stat.o CC test-stat-time.o CC test-stdckdint-h.o CC test-stddef-h.o CC test-stdint-h.o CC test-stdio-h.o CC test-stdlib-h.o CC test-str_endswith.o CC test-str_startswith.o CC test-strcasecmp.o CC test-strerror.o CC test-strerror_r.o CC test-string-h.o CC test-strings-h.o CC test-strncasecmp.o CC test-strncpy.o CC test-strnlen.o CC test-strndup.o CC test-strverscmp.o CC test-strnul.o CC test-symlink.o CC test-sys_ioctl-h.o CC test-sys_select-h.o CC test-sys_socket-h.o CC test-sys_time-h.o CC test-sys_types-h.o CC test-sys_uio-h.o CC test-thread_self.o CC test-thread_create.o CC test-time-h.o CC test-sys_stat-h.o CC test-gmtime_r.o CC test-time.o CC test-gmtime_r-mt.o CC test-localtime_r.o CC test-localtime_r-mt.o CC test-timespec.o CC test-tls.o CC test-trunc1.o CC test-truncl.o CC test-uchar-h.o CC test-trunc2.o CC test-unsetenv.o CC test-usleep.o CC test-unistd-h.o CC test-vasnprintf.o CC test-vasprintf.o CC test-verify.o CC test-vsnprintf.o make[6]: 'libtests.a' is up to date. CC test-wchar-h.o CC test-wcrtomb-w32.o CC test-wctype-h.o CC test-wcwidth.o CC test-wcrtomb.o CC test-windows-recmutex-type.o CC test-windows-timedrecmutex-type.o CC test-windows-mutex-type.o CC test-xalloc-die.o CC test-windows-timedmutex-type.o CC unicase/test-uc_tolower.o CC unictype/test-ctype_alnum.o CC unictype/test-ctype_blank.o CC unictype/test-ctype_cntrl.o CC unicase/test-unicase-h.o CC unictype/test-ctype_digit.o CC unictype/test-unictype-h.o CC unictype/test-ctype_graph.o CC unictype/test-ctype_print.o CC unictype/test-ctype_lower.o CC unictype/test-ctype_alpha.o CC unictype/test-ctype_punct.o CC unictype/test-ctype_space.o CC unictype/test-ctype_upper.o CC unictype/test-ctype_xdigit.o CC uninorm/test-uninorm-h.o CC uniwidth/test-uniwidth-h.o CC uniwidth/test-uc_width.o CC uniwidth/test-uc_width2.o CCLD test-arpa_inet-h CCLD test-assert CCLD test-bool CCLD test-ctype-h CCLD test-fcntl-h CCLD test-inttypes-h CCLD test-alignasof CCLD test-alloca-opt CCLD test-limits-h CCLD test-locale-h CCLD test-byteswap CCLD test-ignore-value CCLD test-largefile CCLD test-netinet_in-h CCLD test-calloc-posix CCLD test-environ CCLD test-fseterr CCLD test-netdb-h CCLD test-accept CCLD test-c-strcasecmp CCLD test-endian CCLD test-fpending CCLD test-sched-h CCLD test-c32rtomb-w32 CCLD test-sys_ioctl-h CCLD test-c-strncasecmp CCLD test-error CCLD test-calloc-gnu CCLD test-getprogname CCLD test-pathmax CCLD test-gettext-h CCLD test-setlocale_null-unlocked CCLD test-setlocale_null CCLD test-strings-h CCLD test-close CCLD test-fseek CCLD test-string-h CCLD test-func CCLD test-perror CCLD test-fseeko CCLD test-stddef-h CCLD test-sys_time-h CCLD test-pthread CCLD test-errno-h CCLD test-fseeko3 CCLD test-ftell CCLD test-hard-locale CCLD test-fputc CCLD test-htonl CCLD test-malloca CCLD test-sys_types-h CCLD test-binary-io CCLD test-bind CCLD test-btowc CCLD test-fdopen CCLD test-fseeko4 CCLD test-ftello4 CCLD test-getdtablesize CCLD test-getline CCLD test-isblank CCLD test-iswblank CCLD test-mbrtowc-w32 CCLD test-sockets CCLD test-malloc-posix CCLD test-stdlib-h CCLD test-sys_select-h CCLD test-unictype-h CCLD test-sys_stat-h CCLD test-btoc32 CCLD test-c32width CCLD test-cloexec CCLD test-fgetc CCLD test-fopen CCLD test-connect CCLD test-fread CCLD test-fopen-gnu CCLD test-fstat CCLD test-ftell3 CCLD test-ftello CCLD test-ftello3 CCLD test-ftruncate CCLD test-fwrite CCLD test-getdelim CCLD test-getpeername CCLD test-gettimeofday CCLD test-inet_pton CCLD test-inet_ntop CCLD test-ioctl CCLD test-localeconv CCLD test-rwlock1 CCLD test-listen CCLD test-lseek CCLD test-math-h CCLD test-malloc-gnu CCLD test-mbrtoc32-w32 CCLD test-mbsinit CCLD test-mbsnlen CCLD test-once1 CCLD test-once2 CCLD test-pipe CCLD test-pthread-once1 CCLD test-pthread-thread CCLD test-putenv CCLD test-raise CCLD test-random CCLD test-random_r CCLD test-reallocarray CCLD test-realloc-posix CCLD test-servent CCLD test-setlocale1 CCLD test-setlocale2 CCLD test-setlocale-w32 CCLD test-shutdown CCLD test-signal-h CCLD test-setsockopt CCLD test-sleep CCLD test-stdint-h CCLD test-str_endswith CCLD test-str_startswith CCLD test-strcasecmp CCLD test-strndup CCLD test-strnul CCLD test-strverscmp CCLD test-sys_socket-h CCLD test-sys_uio-h CCLD test-thread_self CCLD test-time-h CCLD test-uchar-h CCLD test-time CCLD test-unicase-h CCLD test-uninorm-h CCLD test-unistd-h CCLD test-uniwidth-h CCLD test-verify CCLD test-wchar-h CCLD test-windows-mutex-type CCLD test-windows-timedmutex-type CCLD test-windows-recmutex-type CCLD test-windows-timedrecmutex-type CCLD test-c32isalnum CCLD test-c32isalpha CCLD test-xalloc-die CCLD test-c-ctype CCLD test-c32iscntrl CCLD test-c32isblank CCLD test-c32isdigit CCLD test-c32isgraph CCLD test-c32islower CCLD test-c32isprint CCLD test-c32isspace CCLD test-c32isupper CCLD test-c32ispunct CCLD test-c32isxdigit CCLD test-c32rtomb CCLD test-canonicalize-lgpl CCLD test-dup2 CCLD test-fcntl CCLD test-float-h CCLD test-explicit_bzero CCLD test-free CCLD test-frexpl CCLD test-getcwd-lgpl CCLD test-frexp CCLD test-scratch-buffer CCLD test-isnand-nolibm CCLD test-intprops CCLD test-getaddrinfo CCLD test-isnanf-nolibm CCLD test-isnanl-nolibm CCLD test-iswdigit CCLD test-iswpunct CCLD test-iswxdigit CCLD test-localeconv-mt CCLD test-lstat CCLD test-localename CCLD test-memset_explicit CCLD test-memchr CCLD test-mkfifo CCLD test-nanosleep CCLD test-perror2 CCLD test-open CCLD test-pthread-rwlock CCLD test-pthread-mutex-type CCLD test-pthread_sigmask1 CCLD test-pthread_sigmask2 CCLD test-random-mt CCLD test-rawmemchr CCLD test-read-file CCLD test-readlink CCLD test-recv CCLD test-recvfrom CCLD test-select-fd CCLD test-select-stdin CCLD test-sendto CCLD test-send CCLD test-setenv CCLD test-setlocale_null-mt-one CCLD test-snprintf CCLD test-sigprocmask CCLD test-stat CCLD test-setlocale_null-mt-all CCLD test-stdckdint-h CCLD test-stdio-h CCLD test-strerror CCLD test-strerror_r CCLD test-strncasecmp CCLD test-strncpy CCLD test-strnlen CCLD test-symlink CCLD test-gmtime_r CCLD test-gmtime_r-mt CCLD test-thread_create CCLD test-localtime_r-mt CCLD test-timespec CCLD test-localtime_r CCLD test-trunc1 CCLD test-truncl CCLD test-ctype_alpha CCLD test-uc_tolower CCLD test-ctype_alnum CCLD test-ctype_blank CCLD test-ctype_cntrl CCLD test-ctype_graph CCLD test-ctype_digit CCLD test-ctype_punct CCLD test-ctype_space CCLD test-ctype_lower CCLD test-ctype_print CCLD test-ctype_upper CCLD test-uc_width CCLD test-ctype_xdigit CCLD test-unsetenv CCLD test-usleep CCLD test-vasnprintf CCLD test-vasprintf CCLD test-vsnprintf CCLD test-wcrtomb-w32 CCLD test-wctype-h CCLD test-wcrtomb CCLD test-wcwidth CCLD test-array_list CCLD test-linked_list CCLD test-lock CCLD test-c32tolower CCLD test-mbrtoc32 CCLD test-parse-datetime CCLD test-pselect CCLD test-pthread-cond CCLD test-pthread-mutex CCLD test-mbrtowc CCLD test-pthread-once2 CCLD test-stat-time CCLD test-signbit CCLD test-trunc2 CCLD test-uc_width2 CCLD test-linkedhash_list CCLD test-rbtree_list CCLD test-select CCLD test-tls make[6]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/src/gl/tests' make check-TESTS make[6]: Entering directory '/build/gnutls/src/gnutls-3.8.13/src/gl/tests' make[7]: Entering directory '/build/gnutls/src/gnutls-3.8.13/src/gl/tests' PASS: test-accept PASS: test-alignasof PASS: test-arpa_inet-h PASS: test-assert PASS: test-bind PASS: test-bool PASS: test-array_list PASS: test-byteswap PASS: test-c-ctype SKIP: test-btoc32-2.sh SKIP: test-btowc-2.sh PASS: test-btoc32-1.sh PASS: test-btowc-1.sh PASS: test-c-strncasecmp.sh PASS: test-c-strcasecmp.sh PASS: test-btoc32-3.sh PASS: test-calloc-posix PASS: test-calloc-gnu PASS: test-c32width PASS: test-btowc-3.sh PASS: test-cloexec PASS: test-alloca-opt PASS: test-binary-io.sh PASS: test-close PASS: test-ctype-h PASS: test-connect SKIP: test-c32rtomb-w32-2.sh SKIP: test-c32rtomb-w32-3.sh SKIP: test-c32rtomb-w32-4.sh PASS: test-endian PASS: test-errno-h PASS: test-environ SKIP: test-c32rtomb-w32-5.sh SKIP: test-c32rtomb-w32-6.sh SKIP: test-c32rtomb-w32-7.sh SKIP: test-c32rtomb-w32-8.sh PASS: test-explicit_bzero PASS: test-fcntl-h PASS: test-fgetc PASS: test-fdopen PASS: test-float-h PASS: test-fputc PASS: test-fopen-gnu PASS: test-fopen PASS: test-c32isalpha.sh PASS: test-fcntl PASS: test-dup2 PASS: test-fread PASS: test-c32isgraph.sh PASS: test-c32isalnum.sh PASS: test-c32isblank.sh PASS: test-c32iscntrl.sh PASS: test-c32ispunct.sh PASS: test-c32isprint.sh PASS: test-c32isspace.sh PASS: test-c32isdigit.sh PASS: test-frexp PASS: test-canonicalize-lgpl PASS: test-c32isxdigit.sh PASS: test-c32rtomb.sh PASS: test-c32isupper.sh PASS: test-c32islower.sh PASS: test-fseterr PASS: test-c32tolower.sh PASS: test-fstat PASS: test-fseek2.sh PASS: test-fseeko2.sh PASS: test-ftell3 PASS: test-fpending.sh PASS: test-ftello3 PASS: test-func PASS: test-fseeko.sh PASS: test-fseek.sh PASS: test-fseeko4.sh ../../../build-aux/test-driver: line 119: 199345 Segmentation fault (core dumped) "$@" >> "$log_file" 2>&1 FAIL: test-free PASS: test-fwrite PASS: test-fseeko3.sh PASS: test-ftell2.sh PASS: test-getcwd-lgpl PASS: test-getdelim PASS: test-ftello2.sh PASS: test-ftruncate.sh PASS: test-getprogname PASS: test-getpeername PASS: test-getline PASS: test-ftell.sh PASS: test-getdtablesize PASS: test-gettext-h PASS: test-gettimeofday PASS: test-ftello.sh PASS: test-htonl PASS: test-scratch-buffer PASS: test-ftello4.sh PASS: test-hard-locale PASS: test-inet_ntop PASS: test-ignore-value PASS: test-inet_pton PASS: test-intprops PASS: test-inttypes-h PASS: test-ioctl PASS: test-isblank PASS: test-isnand-nolibm PASS: test-isnanl-nolibm PASS: test-isnanf-nolibm PASS: test-iswblank PASS: test-largefile PASS: test-limits-h PASS: test-listen PASS: test-locale-h PASS: test-localeconv PASS: test-linked_list PASS: test-linkedhash_list SKIP: test-localeconv-mt PASS: test-iswpunct.sh PASS: test-localename PASS: test-iswdigit.sh PASS: test-malloc-gnu PASS: test-frexpl PASS: test-iswxdigit.sh PASS: test-malloc-posix PASS: test-math-h SKIP: test-mbrtoc32-2.sh SKIP: test-mbrtoc32-4.sh PASS: test-lstat SKIP: test-mbrtoc32-5.sh SKIP: test-mbrtoc32-w32-2.sh PASS: test-mbrtoc32-1.sh SKIP: test-mbrtoc32-w32-3.sh PASS: test-malloca PASS: test-mbrtoc32-3.sh SKIP: test-mbrtowc-4.sh SKIP: test-mbrtowc-2.sh SKIP: test-mbrtoc32-w32-4.sh SKIP: test-mbrtoc32-w32-6.sh SKIP: test-mbrtoc32-w32-7.sh SKIP: test-mbrtoc32-w32-5.sh SKIP: test-mbrtowc-5.sh PASS: test-memset_explicit SKIP: test-mbrtoc32-w32-8.sh SKIP: test-mbrtowc-w32-2.sh SKIP: test-mbrtowc-w32-3.sh SKIP: test-mbrtowc-w32-5.sh SKIP: test-mbrtowc-w32-4.sh PASS: test-mbrtowc-1.sh PASS: test-netdb-h PASS: test-mbrtowc-3.sh SKIP: test-mbrtowc-w32-6.sh SKIP: test-mbrtowc-w32-7.sh PASS: test-netinet_in-h SKIP: test-mbrtowc-w32-8.sh PASS: test-once1 PASS: test-once2 PASS: test-open PASS: test-mbsinit.sh PASS: test-lseek.sh PASS: test-rwlock1 PASS: test-mbsnlen.sh PASS: test-pathmax PASS: test-parse-datetime PASS: test-perror2 PASS: test-pipe PASS: test-mkfifo PASS: test-pthread PASS: test-pthread-once1 PASS: test-pthread-mutex-type PASS: test-pselect PASS: test-pthread-thread PASS: test-putenv PASS: test-random_r PASS: test-raise PASS: test-random PASS: test-rawmemchr PASS: test-recv PASS: test-reallocarray PASS: test-read-file PASS: test-realloc-posix PASS: test-sched-h PASS: test-recvfrom PASS: test-rbtree_list PASS: test-error.sh PASS: test-select PASS: test-send PASS: test-sendto PASS: test-setenv PASS: test-servent PASS: test-readlink PASS: test-setlocale_null SKIP: test-setlocale_null-mt-one SKIP: test-setlocale_null-mt-all PASS: test-setlocale_null-unlocked SKIP: test-setlocale-w32 PASS: test-setsockopt PASS: test-shutdown SKIP: test-setlocale1.sh PASS: test-signal-h PASS: test-signbit PASS: test-sockets PASS: test-stat PASS: test-snprintf PASS: test-stdckdint-h PASS: test-stat-time PASS: test-stdint-h PASS: test-stddef-h PASS: test-stdio-h PASS: test-stdlib-h PASS: test-str_endswith PASS: test-str_startswith PASS: test-strerror SKIP: test-strcasecmp-2.sh PASS: test-strings-h PASS: test-string-h PASS: test-strerror_r PASS: test-strncpy PASS: test-strndup PASS: test-strcasecmp-1.sh PASS: test-strnul PASS: test-strverscmp PASS: test-sys_select-h PASS: test-sys_ioctl-h SKIP: test-strncasecmp-2.sh PASS: test-sys_socket-h PASS: test-sys_stat-h PASS: test-sys_time-h PASS: test-sys_types-h PASS: test-strncasecmp-1.sh PASS: test-getaddrinfo PASS: test-strnlen PASS: test-sys_uio-h PASS: test-thread_self PASS: test-time-h PASS: test-thread_create PASS: test-symlink PASS: test-gmtime_r PASS: test-timespec PASS: test-trunc1 PASS: test-localtime_r PASS: test-uchar-h PASS: test-truncl PASS: test-unicase-h PASS: test-trunc2 PASS: test-unictype-h PASS: test-uc_tolower PASS: test-ctype_alnum PASS: test-ctype_alpha PASS: test-ctype_graph PASS: test-ctype_blank PASS: test-ctype_print PASS: test-ctype_punct PASS: test-ctype_cntrl PASS: test-ctype_digit PASS: test-ctype_lower PASS: test-unistd-h PASS: test-uniwidth-h PASS: test-uc_width PASS: test-ctype_xdigit PASS: test-ctype_upper PASS: test-ctype_space PASS: test-uninorm-h PASS: test-unsetenv PASS: test-random-mt PASS: test-vasprintf PASS: test-verify PASS: test-vasnprintf PASS: test-vsnprintf PASS: test-wchar-h SKIP: test-wcrtomb-w32-4.sh SKIP: test-wcrtomb-w32-3.sh SKIP: test-wcrtomb-w32-2.sh PASS: test-wctype-h SKIP: test-wcrtomb-w32-5.sh SKIP: test-wcrtomb-w32-6.sh SKIP: test-windows-mutex-type SKIP: test-windows-recmutex-type PASS: test-wcwidth SKIP: test-wcrtomb-w32-7.sh SKIP: test-windows-timedrecmutex-type SKIP: test-windows-timedmutex-type SKIP: test-wcrtomb-w32-8.sh PASS: test-wcrtomb.sh PASS: test-setlocale2.sh PASS: uniwidth/test-uc_width2.sh PASS: test-perror.sh PASS: test-pthread-once2 PASS: test-nanosleep PASS: test-pthread-rwlock PASS: test-time PASS: test-init.sh PASS: test-xalloc-die.sh PASS: test-select-out.sh PASS: test-gmtime_r-mt PASS: test-localtime_r-mt PASS: test-usleep PASS: test-memchr PASS: test-pthread_sigmask2 PASS: test-pthread_sigmask1 PASS: test-sleep PASS: test-sigprocmask PASS: test-select-in.sh PASS: test-pthread-mutex PASS: test-pthread-cond PASS: test-lock PASS: test-verify.sh PASS: test-tls ============================================================================ Testsuite summary for GnuTLS 3.8.13 ============================================================================ # TOTAL: 303 # PASS: 255 # SKIP: 47 # XFAIL: 0 # FAIL: 1 # XPASS: 0 # ERROR: 0 ============================================================================ See src/gl/tests/test-suite.log for debugging. Some test(s) failed. Please report this to bugs@gnutls.org, together with the test-suite.log file (gzipped) and your system information. Thanks. ============================================================================ make[7]: *** [Makefile:7958: test-suite.log] Error 1 make[7]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/src/gl/tests' make[6]: *** [Makefile:8093: check-TESTS] Error 2 make[6]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/src/gl/tests' make[5]: *** [Makefile:10333: check-am] Error 2 make[5]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/src/gl/tests' make[4]: *** [Makefile:7851: check-recursive] Error 1 make[4]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/src/gl/tests' make[3]: *** [Makefile:10335: check] Error 2 make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/src/gl/tests' make[2]: *** [Makefile:5884: check-recursive] Error 1 make[2]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/src/gl' make[1]: *** [Makefile:6036: check] Error 2 make[1]: Leaving directory '/build/gnutls/src/gnutls-3.8.13/src/gl' make: *** [Makefile:3456: check-recursive] Error 1 ==> ERROR: A failure occurred in check().  Aborting... [!p]104\[?7h]3008;end=b9187a57534541609cabdf372b39a785\==> ERROR: Build failed, check /var/lib/archbuild/core-testing-riscv64/felix-7/build [?25h[?25h[?25hreceiving incremental file list gnutls-3.8.13-2-riscv64-build.log gnutls-3.8.13-2-riscv64-check.log gnutls-3.8.13-2-riscv64-prepare.log sent 81 bytes received 2,650,486 bytes 1,060,226.80 bytes/sec total size is 31,779,264 speedup is 11.99